* [PATCH V10 04/17] PCI: Store VF BAR size in pci_sriov
From: Wei Yang @ 2014-12-22 5:54 UTC (permalink / raw)
To: bhelgaas, benh, gwshan; +Cc: linux-pci, Wei Yang, linuxppc-dev
In-Reply-To: <1419227677-12312-1-git-send-email-weiyang@linux.vnet.ibm.com>
Currently we don't store the VF BAR size, and each time we calculate the size
by dividing the PF's IOV BAR size by total_VFs.
This patch stores the VF BAR size in pci_sriov and introduces a function to
retrieve it. Also, it adds a log message to show the total PF's IOV BAR size.
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
drivers/pci/iov.c | 28 ++++++++++++++++++++--------
drivers/pci/pci.h | 2 ++
include/linux/pci.h | 3 +++
3 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 554dd64..9a3e16c 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -100,6 +100,14 @@ static void virtfn_remove_bus(struct pci_bus *physbus, struct pci_bus *virtbus)
pci_remove_bus(virtbus);
}
+resource_size_t pci_iov_resource_size(struct pci_dev *dev, int resno)
+{
+ if (!dev->is_physfn)
+ return 0;
+
+ return dev->sriov->res[resno - PCI_IOV_RESOURCES];
+}
+
static int virtfn_add(struct pci_dev *dev, int id, int reset)
{
int i;
@@ -135,8 +143,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset)
continue;
virtfn->resource[i].name = pci_name(virtfn);
virtfn->resource[i].flags = res->flags;
- size = resource_size(res);
- do_div(size, iov->total_VFs);
+ size = pci_iov_resource_size(dev, i + PCI_IOV_RESOURCES);
virtfn->resource[i].start = res->start + size * id;
virtfn->resource[i].end = virtfn->resource[i].start + size - 1;
rc = request_resource(res, &virtfn->resource[i]);
@@ -419,6 +426,12 @@ found:
pgsz &= ~(pgsz - 1);
pci_write_config_dword(dev, pos + PCI_SRIOV_SYS_PGSIZE, pgsz);
+ iov = kzalloc(sizeof(*iov), GFP_KERNEL);
+ if (!iov) {
+ rc = -ENOMEM;
+ goto failed;
+ }
+
nres = 0;
for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) {
res = dev->resource + PCI_IOV_RESOURCES + i;
@@ -430,16 +443,15 @@ found:
rc = -EIO;
goto failed;
}
+ iov->res[res - dev->resource - PCI_IOV_RESOURCES] =
+ resource_size(res);
res->end = res->start + resource_size(res) * total - 1;
+ dev_info(&dev->dev, "VF BAR%ld: %pR (for %d VFs)",
+ res - dev->resource - PCI_IOV_RESOURCES,
+ res, total);
nres++;
}
- iov = kzalloc(sizeof(*iov), GFP_KERNEL);
- if (!iov) {
- rc = -ENOMEM;
- goto failed;
- }
-
iov->pos = pos;
iov->nres = nres;
iov->ctrl = ctrl;
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 94faf97..b1c9fdd 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -241,6 +241,8 @@ struct pci_sriov {
struct pci_dev *dev; /* lowest numbered PF */
struct pci_dev *self; /* this PF */
struct mutex lock; /* lock for VF bus */
+ resource_size_t res[PCI_SRIOV_NUM_BARS];
+ /* VF BAR size */
};
#ifdef CONFIG_PCI_ATS
diff --git a/include/linux/pci.h b/include/linux/pci.h
index ae7a7ea..f0b5f87 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1670,6 +1670,7 @@ int pci_num_vf(struct pci_dev *dev);
int pci_vfs_assigned(struct pci_dev *dev);
int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs);
int pci_sriov_get_totalvfs(struct pci_dev *dev);
+resource_size_t pci_iov_resource_size(struct pci_dev *dev, int resno);
#else
static inline int pci_iov_virtfn_bus(struct pci_dev *dev, int id)
{
@@ -1689,6 +1690,8 @@ static inline int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs)
{ return 0; }
static inline int pci_sriov_get_totalvfs(struct pci_dev *dev)
{ return 0; }
+static inline resource_size_t pci_iov_resource_size(struct pci_dev *dev, int resno)
+{ return 0; }
#endif
#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
--
1.7.9.5
^ permalink raw reply related
* [PATCH V10 03/17] PCI: Add weak pcibios_iov_resource_alignment() interface
From: Wei Yang @ 2014-12-22 5:54 UTC (permalink / raw)
To: bhelgaas, benh, gwshan; +Cc: linux-pci, Wei Yang, linuxppc-dev
In-Reply-To: <1419227677-12312-1-git-send-email-weiyang@linux.vnet.ibm.com>
The alignment of PF's IOV BAR is designed to be the individual size of a VF's
BAR size. This works fine for many platforms, but on PowerNV platform it needs
some change.
The original alignment works, since at sizing and assigning stage the
requirement is from an individual VF's BAR size instead of the PF's IOV BAR.
This is the reason for the original code to just retrieve the individual
VF BAR size as the alignment.
On PowerNV platform, it is required to align the whole PF IOV BAR to a hardware
segment. Based on this fact, the alignment of PF's IOV BAR should be
calculated seperately.
This patch introduces a weak pcibios_iov_resource_alignment() interface, which
gives platform a chance to implement specific method to calculate the PF's IOV
BAR alignment.
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
drivers/pci/iov.c | 11 ++++++++++-
include/linux/pci.h | 3 +++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 5437fad0..554dd64 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -556,6 +556,12 @@ int pci_iov_resource_bar(struct pci_dev *dev, int resno)
4 * (resno - PCI_IOV_RESOURCES);
}
+resource_size_t __weak pcibios_iov_resource_alignment(struct pci_dev *dev,
+ int resno, resource_size_t align)
+{
+ return align;
+}
+
/**
* pci_sriov_resource_alignment - get resource alignment for VF BAR
* @dev: the PCI device
@@ -570,12 +576,15 @@ resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno)
{
struct resource tmp;
int reg = pci_iov_resource_bar(dev, resno);
+ resource_size_t align;
if (!reg)
return 0;
__pci_read_base(dev, pci_bar_unknown, &tmp, reg);
- return resource_alignment(&tmp);
+ align = resource_alignment(&tmp);
+
+ return pcibios_iov_resource_alignment(dev, resno, align);
}
/**
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 74ef944..ae7a7ea 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1163,6 +1163,9 @@ unsigned char pci_bus_max_busnr(struct pci_bus *bus);
void pci_setup_bridge(struct pci_bus *bus);
resource_size_t pcibios_window_alignment(struct pci_bus *bus,
unsigned long type);
+resource_size_t pcibios_iov_resource_alignment(struct pci_dev *dev,
+ int resno,
+ resource_size_t align);
#define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0)
#define PCI_VGA_STATE_CHANGE_DECODES (1 << 1)
--
1.7.9.5
^ permalink raw reply related
* [PATCH V10 02/17] PCI/IOV: add VF enable/disable hook
From: Wei Yang @ 2014-12-22 5:54 UTC (permalink / raw)
To: bhelgaas, benh, gwshan; +Cc: linux-pci, Wei Yang, linuxppc-dev
In-Reply-To: <1419227677-12312-1-git-send-email-weiyang@linux.vnet.ibm.com>
VFs are dynamically created/released when driver enable them. On some
platforms, like PowerNV, special resources are necessary to enable VFs.
This patch adds two hooks for platform initialization before creating the VFs.
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
drivers/pci/iov.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index e76d1a0..5437fad0 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -213,6 +213,11 @@ static void virtfn_remove(struct pci_dev *dev, int id, int reset)
pci_dev_put(dev);
}
+int __weak pcibios_sriov_enable(struct pci_dev *pdev, u16 vf_num)
+{
+ return 0;
+}
+
static int sriov_enable(struct pci_dev *dev, int nr_virtfn)
{
int rc;
@@ -223,6 +228,7 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn)
struct pci_dev *pdev;
struct pci_sriov *iov = dev->sriov;
int bars = 0;
+ int retval;
if (!nr_virtfn)
return 0;
@@ -297,6 +303,12 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn)
if (nr_virtfn < initial)
initial = nr_virtfn;
+ if ((retval = pcibios_sriov_enable(dev, initial))) {
+ dev_err(&dev->dev, "Failure %d from pcibios_sriov_setup()\n",
+ retval);
+ return retval;
+ }
+
for (i = 0; i < initial; i++) {
rc = virtfn_add(dev, i, 0);
if (rc)
@@ -325,6 +337,11 @@ failed:
return rc;
}
+int __weak pcibios_sriov_disable(struct pci_dev *pdev)
+{
+ return 0;
+}
+
static void sriov_disable(struct pci_dev *dev)
{
int i;
@@ -336,6 +353,8 @@ static void sriov_disable(struct pci_dev *dev)
for (i = 0; i < iov->num_VFs; i++)
virtfn_remove(dev, i, 0);
+ pcibios_sriov_disable(dev);
+
iov->ctrl &= ~(PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE);
pci_cfg_access_lock(dev);
pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, iov->ctrl);
--
1.7.9.5
^ permalink raw reply related
* [PATCH V10 01/17] PCI/IOV: Export interface for retrieve VF's BDF
From: Wei Yang @ 2014-12-22 5:54 UTC (permalink / raw)
To: bhelgaas, benh, gwshan; +Cc: linux-pci, Wei Yang, linuxppc-dev
In-Reply-To: <1419227677-12312-1-git-send-email-weiyang@linux.vnet.ibm.com>
When implementing the SR-IOV on PowerNV platform, some resource reservation is
needed for VFs which don't exist at the bootup stage. To do the match between
resources and VFs, the code need to get the VF's BDF in advance.
In this patch, it exports the interface to retrieve VF's BDF:
* Make the virtfn_bus as an interface
* Make the virtfn_devfn as an interface
* Rename them with more specific name
* Code cleanup in pci_sriov_resource_alignment()
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
drivers/pci/iov.c | 22 +++++++++++++---------
include/linux/pci.h | 11 +++++++++++
2 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index ea3a82c..e76d1a0 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -19,14 +19,18 @@
#define VIRTFN_ID_LEN 16
-static inline u8 virtfn_bus(struct pci_dev *dev, int id)
+int pci_iov_virtfn_bus(struct pci_dev *dev, int id)
{
+ if (!dev->is_physfn)
+ return -EINVAL;
return dev->bus->number + ((dev->devfn + dev->sriov->offset +
dev->sriov->stride * id) >> 8);
}
-static inline u8 virtfn_devfn(struct pci_dev *dev, int id)
+int pci_iov_virtfn_devfn(struct pci_dev *dev, int id)
{
+ if (!dev->is_physfn)
+ return -EINVAL;
return (dev->devfn + dev->sriov->offset +
dev->sriov->stride * id) & 0xff;
}
@@ -62,7 +66,7 @@ static inline void pci_iov_max_bus_range(struct pci_dev *dev)
for ( ; total >= 0; total--) {
pci_iov_set_numvfs(dev, total);
- busnr = virtfn_bus(dev, iov->total_VFs - 1);
+ busnr = pci_iov_virtfn_bus(dev, iov->total_VFs - 1);
if (busnr > max)
max = busnr;
}
@@ -108,7 +112,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset)
struct pci_bus *bus;
mutex_lock(&iov->dev->sriov->lock);
- bus = virtfn_add_bus(dev->bus, virtfn_bus(dev, id));
+ bus = virtfn_add_bus(dev->bus, pci_iov_virtfn_bus(dev, id));
if (!bus)
goto failed;
@@ -116,7 +120,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset)
if (!virtfn)
goto failed0;
- virtfn->devfn = virtfn_devfn(dev, id);
+ virtfn->devfn = pci_iov_virtfn_devfn(dev, id);
virtfn->vendor = dev->vendor;
pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_DID, &virtfn->device);
pci_setup_device(virtfn);
@@ -179,8 +183,8 @@ static void virtfn_remove(struct pci_dev *dev, int id, int reset)
struct pci_sriov *iov = dev->sriov;
virtfn = pci_get_domain_bus_and_slot(pci_domain_nr(dev->bus),
- virtfn_bus(dev, id),
- virtfn_devfn(dev, id));
+ pci_iov_virtfn_bus(dev, id),
+ pci_iov_virtfn_devfn(dev, id));
if (!virtfn)
return;
@@ -255,7 +259,7 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn)
iov->offset = offset;
iov->stride = stride;
- if (virtfn_bus(dev, nr_virtfn - 1) > dev->bus->busn_res.end) {
+ if (pci_iov_virtfn_bus(dev, nr_virtfn - 1) > dev->bus->busn_res.end) {
dev_err(&dev->dev, "SR-IOV: bus number out of range\n");
return -ENOMEM;
}
@@ -551,7 +555,7 @@ resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno)
if (!reg)
return 0;
- __pci_read_base(dev, pci_bar_unknown, &tmp, reg);
+ __pci_read_base(dev, pci_bar_unknown, &tmp, reg);
return resource_alignment(&tmp);
}
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 360a966..74ef944 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1658,6 +1658,9 @@ int pci_ext_cfg_avail(void);
void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
#ifdef CONFIG_PCI_IOV
+int pci_iov_virtfn_bus(struct pci_dev *dev, int id);
+int pci_iov_virtfn_devfn(struct pci_dev *dev, int id);
+
int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn);
void pci_disable_sriov(struct pci_dev *dev);
int pci_num_vf(struct pci_dev *dev);
@@ -1665,6 +1668,14 @@ int pci_vfs_assigned(struct pci_dev *dev);
int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs);
int pci_sriov_get_totalvfs(struct pci_dev *dev);
#else
+static inline int pci_iov_virtfn_bus(struct pci_dev *dev, int id)
+{
+ return -ENOSYS;
+}
+static inline int pci_iov_virtfn_devfn(struct pci_dev *dev, int id)
+{
+ return -ENOSYS;
+}
static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn)
{ return -ENODEV; }
static inline void pci_disable_sriov(struct pci_dev *dev) { }
--
1.7.9.5
^ permalink raw reply related
* [PATCH V10 00/17] Enable SRIOV on Power8
From: Wei Yang @ 2014-12-22 5:54 UTC (permalink / raw)
To: bhelgaas, benh, gwshan; +Cc: linux-pci, Wei Yang, linuxppc-dev
This patchset enables the SRIOV on POWER8.
The gerneral idea is put each VF into one individual PE and allocate required
resources like MMIO/DMA/MSI. The major difficulty comes from the MMIO
allocation and adjustment for PF's IOV BAR.
On P8, we use M64BT to cover a PF's IOV BAR, which could make an individual VF
sit in its own PE. This gives more flexiblity, while at the mean time it
brings on some restrictions on the PF's IOV BAR size and alignment.
To achieve this effect, we need to do some hack on pci devices's resources.
1. Expand the IOV BAR properly.
Done by pnv_pci_ioda_fixup_iov_resources().
2. Shift the IOV BAR properly.
Done by pnv_pci_vf_resource_shift().
3. IOV BAR alignment is calculated by arch dependent function instead of an
individual VF BAR size.
Done by pnv_pcibios_sriov_resource_alignment().
4. Take the IOV BAR alignment into consideration in the sizing and assigning.
This is achieved by commit: "PCI: Take additional IOV BAR alignment in
sizing and assigning"
Test Environment:
The SRIOV device tested is Emulex Lancer(10df:e220) and
Mellanox ConnectX-3(15b3:1003) on POWER8.
Examples on pass through a VF to guest through vfio:
1. unbind the original driver and bind to vfio-pci driver
echo 0000:06:0d.0 > /sys/bus/pci/devices/0000:06:0d.0/driver/unbind
echo 1102 0002 > /sys/bus/pci/drivers/vfio-pci/new_id
Note: this should be done for each device in the same iommu_group
2. Start qemu and pass device through vfio
/home/ywywyang/git/qemu-impreza/ppc64-softmmu/qemu-system-ppc64 \
-M pseries -m 2048 -enable-kvm -nographic \
-drive file=/home/ywywyang/kvm/fc19.img \
-monitor telnet:localhost:5435,server,nowait -boot cd \
-device "spapr-pci-vfio-host-bridge,id=CXGB3,iommu=26,index=6"
Verify this is the exact VF response:
1. ping from a machine in the same subnet(the broadcast domain)
2. run arp -n on this machine
9.115.251.20 ether 00:00:c9:df:ed:bf C eth0
3. ifconfig in the guest
# ifconfig eth1
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 9.115.251.20 netmask 255.255.255.0 broadcast 9.115.251.255
inet6 fe80::200:c9ff:fedf:edbf prefixlen 64 scopeid 0x20<link>
ether 00:00:c9:df:ed:bf txqueuelen 1000 (Ethernet)
RX packets 175 bytes 13278 (12.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 58 bytes 9276 (9.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
4. They have the same MAC address
Note: make sure you shutdown other network interfaces in guest.
---
v10:
* remove weak function pcibios_iov_resource_size()
the VF BAR size is stored in pci_sriov structure and retrieved from
pci_iov_resource_size()
* Use "Reserve additional" instead of "Expand" to be more acurate in the
change log
* add log message to show the PF's IOV BAR final size
* add pcibios_sriov_enable/disable() weak funcion in sriov_enable/disable()
for arch setup before enable VFs. Like the arch could fix up the BDF for
VFs, since the change of NumVFs would affect the BDF of VFs.
* Add some explanation of PE on Power arch in the documentation
v9:
* make the change log consistent in the terminology
PF's IOV BAR -> the SRIOV BAR in PF
VF's BAR -> the normal BAR in VF's view
* rename all newly introduced function from _sriov_ to _iov_
* rename the document to Documentation/powerpc/pci_iov_resource_on_powernv.txt
* add the vendor id and device id of the tested devices
* change return value from EINVAL to ENOSYS for pci_iov_virtfn_bus() and
pci_iov_virtfn_devfn() when it is called on PF or SRIOV is not configured
* rebase on 3.18-rc2 and tested
v8:
* use weak funcion pcibios_sriov_resource_size() instead of some flag to
retrieve the IOV BAR size.
* add a document Documentation/powerpc/pci_resource.txt to explain the
design.
* make pci_iov_virtfn_bus()/pci_iov_virtfn_devfn() not inline.
* extract a function res_to_dev_res(), so that it is more general to get
additional size and alignment
* fix one contention which is introduced in "powrepc/pci: Refactor pci_dn".
the root cause is pci_get_slot() takes pci_bus_sem and leads to dead
lock.
v7:
* add IORESOURCE_ARCH flag for IOV BAR on powernv platform.
* when IOV BAR has IORESOURCE_ARCH flag, the size is retrieved from
hardware directly. If not, calculate as usual.
* reorder the patch set, group them by subsystem:
PCI, powerpc, powernv
* rebase it on 3.16-rc6
v6:
* remove pcibios_enable_sriov()/pcibios_disable_sriov() weak function
similar function is moved to
pnv_pci_enable_device_hook()/pnv_pci_disable_device_hook(). When PF is
enabled, platform will try best to allocate resources for VFs.
* remove pcibios_sriov_resource_size weak function
* VF BAR size is retrieved from hardware directly in virtfn_add()
v5:
* merge those SRIOV related platform functions in machdep_calls
wrap them in one CONFIG_PCI_IOV marco
* define IODA_INVALID_M64 to replace (-1)
use this value to represent the m64_wins is not used
* rename pnv_pci_release_dev_dma() to pnv_pci_ioda2_release_dma_pe()
this function is a conterpart to pnv_pci_ioda2_setup_dma_pe()
* change dev_info() to dev_dgb() in pnv_pci_ioda_fixup_iov_resources()
reduce some log in kernel
* release M64 window in pnv_pci_ioda2_release_dma_pe()
v4:
* code format fix, eg. not exceed 80 chars
* in commit "ppc/pnv: Add function to deconfig a PE"
check the bus has a bridge before print the name
remove a PE from its own PELTV
* change the function name for sriov resource size/alignment
* rebase on 3.16-rc3
* VFs will not rely on device node
As Grant Likely's comments, kernel should have the ability to handle the
lack of device_node gracefully. Gavin restructure the pci_dn, which
makes the VF will have pci_dn even when VF's device_node is not provided
by firmware.
* clean all the patch title to make them comply with one style
* fix return value for pci_iov_virtfn_bus/pci_iov_virtfn_devfn
v3:
* change the return type of virtfn_bus/virtfn_devfn to int
change the name of these two functions to pci_iov_virtfn_bus/pci_iov_virtfn_devfn
* reduce the second parameter or pcibios_sriov_disable()
* use data instead of pe in "ppc/pnv: allocate pe->iommu_table dynamically"
* rename __pci_sriov_resource_size to pcibios_sriov_resource_size
* rename __pci_sriov_resource_alignment to pcibios_sriov_resource_alignment
v2:
* change the return value of virtfn_bus/virtfn_devfn to 0
* move some TCE related marco definition to
arch/powerpc/platforms/powernv/pci.h
* fix the __pci_sriov_resource_alignment on powernv platform
During the sizing stage, the IOV BAR is truncated to 0, which will
effect the order of allocation. Fix this, so that make sure BAR will be
allocated ordered by their alignment.
v1:
* improve the change log for
"PCI: Add weak __pci_sriov_resource_size() interface"
"PCI: Add weak __pci_sriov_resource_alignment() interface"
"PCI: take additional IOV BAR alignment in sizing and assigning"
* wrap VF PE code in CONFIG_PCI_IOV
* did regression test on P7.
Gavin Shan (1):
powrepc/pci: Refactor pci_dn
Wei Yang (16):
PCI/IOV: Export interface for retrieve VF's BDF
PCI/IOV: add VF enable/disable hook
PCI: Add weak pcibios_iov_resource_alignment() interface
PCI: Store VF BAR size in pci_sriov
PCI: Take additional PF's IOV BAR alignment in sizing and assigning
powerpc/pci: Add PCI resource alignment documentation
powerpc/pci: Don't unset pci resources for VFs
powerpc/pci: remove pci_dn->pcidev field
powerpc/powernv: Use pci_dn in PCI config accessor
powerpc/powernv: Allocate pe->iommu_table dynamically
powerpc/powernv: Reserve additional space for IOV BAR according to
the number of total_pe
powerpc/powernv: Implement pcibios_iov_resource_alignment() on
powernv
powerpc/powernv: Shift VF resource with an offset
powerpc/powernv: Allocate VF PE
powerpc/powernv: Reserve additional space for IOV BAR, with
m64_per_iov supported
powerpc/powernv: Group VF PE when IOV BAR is big on PHB3
.../powerpc/pci_iov_resource_on_powernv.txt | 215 ++++++
arch/powerpc/include/asm/device.h | 3 +
arch/powerpc/include/asm/iommu.h | 3 +
arch/powerpc/include/asm/machdep.h | 7 +
arch/powerpc/include/asm/pci-bridge.h | 24 +-
arch/powerpc/kernel/pci-common.c | 23 +
arch/powerpc/kernel/pci_dn.c | 251 ++++++-
arch/powerpc/platforms/powernv/eeh-powernv.c | 14 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 739 +++++++++++++++++++-
arch/powerpc/platforms/powernv/pci.c | 87 +--
arch/powerpc/platforms/powernv/pci.h | 13 +-
drivers/pci/iov.c | 80 ++-
drivers/pci/pci.h | 2 +
drivers/pci/setup-bus.c | 85 ++-
include/linux/pci.h | 17 +
15 files changed, 1449 insertions(+), 114 deletions(-)
create mode 100644 Documentation/powerpc/pci_iov_resource_on_powernv.txt
--
1.7.9.5
^ permalink raw reply
* Re: arch: powerpc: platforms: ps3: repository.c: Remove unused function
From: Michael Ellerman @ 2014-12-22 5:02 UTC (permalink / raw)
To: Rickard Strandqvist, Geoff Levand, Benjamin Herrenschmidt
Cc: cbe-oss-dev, linuxppc-dev, Paul Mackerras, linux-kernel,
Rickard Strandqvist
In-Reply-To: <1419087601-4889-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
On Sat, 2014-20-12 at 15:00:01 UTC, Rickard Strandqvist wrote:
> Remove the function ps3_repository_write_highmem_info() that is not used anywhere.
>
> This was partially found by using a static code analysis program called cppcheck.
Actually it looks like everything under CONFIG_PS3_REPOSITORY_WRITE is unused,
and never was used.
We appreciate these sort of patches, but if you can dig a little deeper and
also work out why the code is unused that would be much more useful.
cheers
^ permalink raw reply
* Re: [PATCH] misc: cxl: sysfs.c: Remove unused function
From: Michael Ellerman @ 2014-12-22 3:55 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Michael Neuling, linuxppc-dev, Ian Munsie,
linux-kernel@vger.kernel.org
In-Reply-To: <CAFo99ga9TYf5hnwOcoRPKsTHhhknoz6_axzP7spe0mvd=YPMLw@mail.gmail.com>
On Sun, 2014-12-21 at 13:46 +0100, Rickard Strandqvist wrote:
> 2014-12-21 5:05 GMT+01:00 Michael Neuling <mikey@neuling.org>:
> >> Remove the function mmio_size_show() that is not used anywhere.
> >
> > Did you compile check this patch?
> >
> > drivers/misc/cxl/sysfs.c:291:74: error: ‘mmio_size_show’ undeclared here (not in a function)
> >
> > It's used here:
> > static struct device_attribute afu_attrs[] = {
> > __ATTR_RO(mmio_size),
>
> Hi
>
> Sorry about that.
>
> Strange because I compile everything as allyesconfig, allmodconfig and
> allnoconfig.
The allyes should have picked it up, so you must have done something wrong.
Please be more careful with these attribute routines, they are not visible with
grep.
cheers
^ permalink raw reply
* Re: arch: powerpc: platforms: embedded6xx: mpc7448_hpc2.c: Remove some unused functions
From: Michael Ellerman @ 2014-12-22 2:56 UTC (permalink / raw)
To: Rickard Strandqvist, Benjamin Herrenschmidt, Paul Mackerras
Cc: linuxppc-dev, linux-kernel, Rickard Strandqvist
In-Reply-To: <1419115353-12374-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
On Sat, 2014-20-12 at 22:42:32 UTC, Rickard Strandqvist wrote:
> Removes some functions that are not used anywhere:
> mpc7448_hpc2_halt() mpc7448_hpc2_power_off()
The other option would be to wire it up.
But the default implementations do more or less the same thing.
As far as I can see these were introduced in c5d56332fd6c "[POWERPC] Add
general support for mpc7448hpc2 (Taiga) platform" and never used.
cheers
^ permalink raw reply
* RE: [PATCH] [v2] power/fsl: add MDIO dt binding for FMan
From: Shaohui Xie @ 2014-12-22 2:31 UTC (permalink / raw)
To: Scott Wood
Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Emilian Medve, Igal.Liberman@freescale.com
In-Reply-To: <1419030955.5581.154.camel@freescale.com>
PiBPbiBGcmksIDIwMTQtMTItMTkgYXQgMDE6MjMgLTA2MDAsIFhpZSBTaGFvaHVpLUIyMTk4OSB3
cm90ZToNCj4gPiA+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+ID4gPiBGcm9tOiBXb29k
IFNjb3R0LUIwNzQyMQ0KPiA+ID4gU2VudDogRnJpZGF5LCBEZWNlbWJlciAxOSwgMjAxNCA2OjAx
IEFNDQo+ID4gPiBUbzogWGllIFNoYW9odWktQjIxOTg5DQo+ID4gPiBDYzogbGludXhwcGMtZGV2
QGxpc3RzLm96bGFicy5vcmc7IGRldmljZXRyZWVAdmdlci5rZXJuZWwub3JnOyBNZWR2ZQ0KPiA+
ID4gRW1pbGlhbi0gRU1NRURWRTE7IExpYmVybWFuIElnYWwtQjMxOTUwDQo+ID4gPiBTdWJqZWN0
OiBSZTogW1BBVENIXSBbdjJdIHBvd2VyL2ZzbDogYWRkIE1ESU8gZHQgYmluZGluZyBmb3IgRk1h
bg0KPiA+ID4NCj4gPiA+IE9uIFRodSwgMjAxNC0xMi0xOCBhdCAwNjo1MyAtMDYwMCwgWGllIFNo
YW9odWktQjIxOTg5IHdyb3RlOg0KPiA+ID4gPiBQaW5nLg0KPiA+ID4gPg0KPiA+ID4gPiBCZXN0
IFJlZ2FyZHMsDQo+ID4gPiA+IFNoYW9odWkgWGllDQo+ID4gPg0KPiA+ID4gSSBjYW4ndCBwdXQg
cGF0Y2hlcyBpbiBteSAtbmV4dCB1bnRpbCB0aGUgbWVyZ2Ugd2luZG93IGNsb3Nlcy4NCj4gPiA+
DQo+ID4gPiA+ID4gPiA+ICtFWEFNUExFDQo+ID4gPiA+ID4gPiA+ICsNCj4gPiA+ID4gPiA+ID4g
K0V4YW1wbGUgZm9yIEZNYW4gdjIgZXh0ZXJuYWwgTURJTzoNCj4gPiA+ID4gPiA+ID4gKw0KPiA+
ID4gPiA+ID4gPiArbWRpb0BmMTAwMCB7DQo+ID4gPiA+ID4gPiA+ICsJY29tcGF0aWJsZSA9ICJm
c2wsZm1hbi14bWRpbyI7DQo+ID4gPiA+ID4gPiA+ICsJcmVnID0gPDB4ZjEwMDAgMHgxMDAwPjsN
Cj4gPiA+ID4gPiA+ID4gKwlidXMtZnJlcXVlbmN5ID0gPDIwMDAwPjsNCj4gPiA+ID4gPiA+ID4g
K307DQo+ID4gPiA+ID4gPg0KPiA+ID4gPiA+ID4gU28gdGhlIGJ1cyBmcmVxdWVuY3kgaXMgb25s
eSAyMCBLSHo/ICBPciBpcyB0aGUgdW5pdCBzdXBwb3NlZA0KPiA+ID4gPiA+ID4gdG8gYmUgc29t
ZXRoaW5nIG90aGVyIHRoYW4gSHo/DQo+ID4gPiA+ID4gW1MuSF0gaXQncyBvbmx5IGFuIGV4YW1w
bGUsIGl0IGNvdWxkIGJlIGRpZmZlcmVudCBvbiByZWFsIFNvQ3MsDQo+ID4gPiA+ID4gYnV0IHRo
ZXkgYWx3YXlzIGxvd2VyIHRoYW4gdGhlIHN0YW5kYXJkIG9uZSwgVGhlIHN0YW5kYXJkIG9uZSBp
cw0KPiA+ID4gPiA+IDIuNU1IeiwgSSBoYXZlDQo+ID4gPiB0byB1c2UgSHogZm9yIGl0Lg0KPiA+
ID4NCj4gPiA+IElzIHRoZXJlIGFueSBTb0MgZm9yIHdoaWNoIDIwIGtIeiBpcyB0aGUgcmlnaHQg
ZnJlcXVlbmN5PyAgSSBqdXN0DQo+ID4gPiB3YW50IHRvIG1ha2Ugc3VyZSB0aGUgZXhhbXBsZSBp
cyByZWFsaXN0aWMuDQo+ID4gW1MuSF0gdGhlIGNsb2NrIGRpdmlkZXIgaGFzIGEgbGltaXRhdGlv
biB0aGF0IHRoZSBNQVggdmFsdWUgaXQgY2FuIGdldA0KPiA+IG9uIEZtYW4gdjIgaXMgMjU1ICgw
eGZmLCA4IGJpdHMpLCBPbiBGbWFuIHYzIGlzIDUxMSgweDFmZiwgOSBiaXRzKS4NCj4gPg0KPiA+
IFNvIHRoZSBsb3dlc3QgZnJlcXVlbmN5IG9uIEZtYW4gdjIgaXM6IEZtYW5fY2xvY2sgLyAoMiAq
IDI1NSksIE9uIEZtYW4NCj4gPiB2MyBpczogRm1hbl9jbG9jayAvICgoMiAqIDUxMSkgKyAxKS4N
Cj4gPg0KPiA+IFRha2UgZGVmYXVsdCBGbWFuIGZyZXF1ZW5jeSBzZXR0aW5nIGZyb20gU0RLMS43
IGFzIGV4YW1wbGUsIHRoZSBsb3dlc3QNCj4gPiBjbG9jayB1c2VkIGZvciBGbWFuIHYyIGlzIDU4
MU1IeiwgVGhlIGxvd2VzdCBjbG9jayBmb3IgRm1hbiB2MyBpcyA2MDBNSHouDQo+ID4NCj4gPiBU
aGVuIHRoZSBsb3dlc3QgYnVzIGZyZXF1ZW5jeSBjYW4gZ2V0IGlzOg0KPiA+IEZtYW4gdjI6IH4x
MTQwS0h6DQo+ID4gRm1hbiB2MzogfjU4N0tIeg0KPiA+DQo+ID4gMjBLSHogaXMgbm90IHByYWN0
aWNlLCB3ZSBkb24ndCBoYXZlIGEgc3VnZ2VzdGVkIHZhbHVlIGluIGVycmF0YSBkb2N1bWVudC4N
Cj4gPiBGb3IgdGhpcyBleGFtcGxlLCBzaG91bGQgSSBwb3N0IGEgbmV3IHZlcnNpb24gd2l0aCBh
IHZhbHVlIGxpa2UgMTIwMEtIej8NCj4gDQo+IFRoaXMgaXMgZGlmZmVyZW50IGZyb20gaG93IHlv
dSBkZXNjcmliZWQgdGhlIHByb2JsZW0gYmVmb3JlLiAgSWYgdGhlIGxpbWl0YXRpb24NCj4gaXMg
b24gdGhlIGRpdmlkZXIsIHJhdGhlciB0aGFuIHRoZSBhYnNvbHV0ZSBidXMgZnJlcXVlbmN5LCB0
aGVuIHNwZWNpZml5IHRoZSBtYXgNCj4gZGl2aWRlci4gIE9yIGJldHRlciwgc2luY2UgYWNjb3Jk
aW5nIHRvIHRoZSBhYm92ZSB0aGlzIGNvcnJlbGF0ZXMgd2l0aCBmbWFuDQo+IHZlcnNpb24sIGp1
c3QgaGF2ZSB0aGUgZHJpdmVyIGtub3cgd2hhdCB0aGUgbWF4IGRpdmlkZXIgaXMgZm9yIGVhY2gg
Zm1hbiB2ZXJzaW9uLg0KW1MuSF0gVGhlIHByb2JsZW0gaXMgbm90IHRoZSBkaXZpZGVyIGhhcyBs
aW1pdGF0aW9uLCB0aGUgcHJvYmxlbSBpcyBhIGRpZmZlcmVudCBidXMgZnJlcXVlbmN5IA0KSXMg
bmVlZGVkIHdoaWNoIGlzIGxvd2VyIHRoYW4gdGhlIHN0YW5kYXJkLCBidXQgZHVlIHRvIHRoZSBk
aXZpZGVyIGxpbWl0YXRpb24sIHRoZSBsb3dlc3QNCmJ1cyBmcmVxdWVuY3kgYWxzbyBoYXMgbGlt
aXRhdGlvbi4gaS5lLiB3ZSBuZWVkIHRvIHVzZSB0aGUgZGl2aWRlciB0byBnZXQgYSBsb3dlciBm
cmVxdWVuY3ksDQpidXQgaG93IG11Y2ggbG93ZXIgdGhlIHZhbHVlIGNvdWxkIGJlIGlzIHJlc3Ry
aWN0ZWQgYnkgdGhlIGRpdmlkZXIgbGltaXRhdGlvbi4NCg0KVGhhbmtzIQ0KU2hhb2h1aQ0K
^ permalink raw reply
* Re: [PATCH] powerpc: powernv: Return to cpu offline loop when finished in KVM guest
From: Michael Ellerman @ 2014-12-22 2:24 UTC (permalink / raw)
To: Alexander Graf; +Cc: Paul Mackerras, Andreas Schwab, kvm-ppc, kvm, linuxppc-dev
In-Reply-To: <5497501E.9040806@suse.de>
On Sun, 2014-12-21 at 23:56 +0100, Alexander Graf wrote:
> On 21.12.14 15:13, Andreas Schwab wrote:
> > arch/powerpc/kvm/built-in.o: In function `kvm_no_guest':
> > arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x724): undefined reference to `power7_wakeup_loss'
>
> Ugh. We just removed support for 970 HV mode, but that obviously doesn't
> mean you can't compile in support for HV mode without enabling p7.
>
> Paul, what would you think of a patch that makes BOOK3S_HV depend on
> PPC_POWERNV?
Paul's out until after Christmas I think, maybe later.
That sounds reasonable to me though, it reflects reality, and we can always
change it in future.
cheers
^ permalink raw reply
* Re: [PATCH] macintosh: therm_pm72: delete deprecated driver
From: Michael Ellerman @ 2014-12-22 2:21 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev
In-Reply-To: <20141219162146.GA3632@katana>
On Fri, 2014-12-19 at 17:21 +0100, Wolfram Sang wrote:
> On Thu, Nov 06, 2014 at 08:50:04PM +1100, Benjamin Herrenschmidt wrote:
> > On Thu, 2014-11-06 at 10:25 +0100, Wolfram Sang wrote:
> > > On Thu, Nov 06, 2014 at 01:19:36PM +1100, Benjamin Herrenschmidt wrote:
> > > > On Thu, 2014-11-06 at 02:45 +0100, Wolfram Sang wrote:
> > > > > The new driver is around for more than 2 years now, so the old one can
> > > > > go. Getting rid of it helps the removal of the legacy .attach_adapter
> > > > > callback of the I2C subsystem.
> > > > >
> > > > > Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> > > >
> > > > Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > >
> > > Thanks! I can take it via my I2C tree, but I'd think it makes more sense
> > > if you take it via ppc? What do you prefer?
> >
> > Either works. These days Michael Ellerman handles the day to day
> > maintainance of the powerpc tree so it's his choice but if you need this
> > as a dependency on your subsequent API removal it's probably better that
> > you take it.
>
> So, I haven't seen this coming in via ppc. I am going to send another
> pull request to Linus tomorrow and will include it unless somebody
> objects soon.
Sorry, communication break down between Ben & I. I'm happy for you to take it.
cheers
^ permalink raw reply
* Re: [PATCH] powerpc: powernv: Return to cpu offline loop when finished in KVM guest
From: Alexander Graf @ 2014-12-21 22:56 UTC (permalink / raw)
To: Andreas Schwab, Paul Mackerras; +Cc: linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <878ui13xbe.fsf@igel.home>
On 21.12.14 15:13, Andreas Schwab wrote:
> arch/powerpc/kvm/built-in.o: In function `kvm_no_guest':
> arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x724): undefined reference to `power7_wakeup_loss'
Ugh. We just removed support for 970 HV mode, but that obviously doesn't
mean you can't compile in support for HV mode without enabling p7.
Paul, what would you think of a patch that makes BOOK3S_HV depend on
PPC_POWERNV?
Alex
^ permalink raw reply
* [PATCH 28/28] macintosh: drop owner assignment from platform_drivers
From: Wolfram Sang @ 2014-12-21 21:14 UTC (permalink / raw)
To: linux-kernel; +Cc: linuxppc-dev, Wolfram Sang
In-Reply-To: <1419196495-9626-1-git-send-email-wsa@the-dreams.de>
This platform_driver does not need to set an owner, it will be populated by the
driver core.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Generated with coccinelle. SmPL file is in the introductory msg. The big
cleanup was pulled in this merge window. This series catches the bits fallen
through. The patches shall go in via the subsystem trees.
drivers/macintosh/windfarm_pm112.c | 1 -
drivers/macintosh/windfarm_pm72.c | 1 -
drivers/macintosh/windfarm_rm31.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/drivers/macintosh/windfarm_pm112.c b/drivers/macintosh/windfarm_pm112.c
index 3024685e4cca..96d16fca68b2 100644
--- a/drivers/macintosh/windfarm_pm112.c
+++ b/drivers/macintosh/windfarm_pm112.c
@@ -668,7 +668,6 @@ static struct platform_driver wf_pm112_driver = {
.remove = wf_pm112_remove,
.driver = {
.name = "windfarm",
- .owner = THIS_MODULE,
},
};
diff --git a/drivers/macintosh/windfarm_pm72.c b/drivers/macintosh/windfarm_pm72.c
index 2f506b9d5a52..e88cfb36a74d 100644
--- a/drivers/macintosh/windfarm_pm72.c
+++ b/drivers/macintosh/windfarm_pm72.c
@@ -789,7 +789,6 @@ static struct platform_driver wf_pm72_driver = {
.remove = wf_pm72_remove,
.driver = {
.name = "windfarm",
- .owner = THIS_MODULE,
},
};
diff --git a/drivers/macintosh/windfarm_rm31.c b/drivers/macintosh/windfarm_rm31.c
index 82fc86a90c1a..bdfcb8a8bfbb 100644
--- a/drivers/macintosh/windfarm_rm31.c
+++ b/drivers/macintosh/windfarm_rm31.c
@@ -682,7 +682,6 @@ static struct platform_driver wf_rm31_driver = {
.remove = wf_rm31_remove,
.driver = {
.name = "windfarm",
- .owner = THIS_MODULE,
},
};
--
2.1.3
^ permalink raw reply related
* [PATCH 13/28] pci: host: drop owner assignment from platform_drivers
From: Wolfram Sang @ 2014-12-21 21:14 UTC (permalink / raw)
To: linux-kernel
Cc: Wolfram Sang, linuxppc-dev, Minghuan Lian, linux-pci,
Bjorn Helgaas, Mingkai Hu, linux-arm-kernel
In-Reply-To: <1419196495-9626-1-git-send-email-wsa@the-dreams.de>
This platform_driver does not need to set an owner, it will be populated by the
driver core.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Generated with coccinelle. SmPL file is in the introductory msg. The big
cleanup was pulled in this merge window. This series catches the bits fallen
through. The patches shall go in via the subsystem trees.
drivers/pci/host/pci-layerscape.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
index 6697b1a4d4fa..68c9e5e9b0a8 100644
--- a/drivers/pci/host/pci-layerscape.c
+++ b/drivers/pci/host/pci-layerscape.c
@@ -167,7 +167,6 @@ MODULE_DEVICE_TABLE(of, ls_pcie_of_match);
static struct platform_driver ls_pcie_driver = {
.driver = {
.name = "layerscape-pcie",
- .owner = THIS_MODULE,
.of_match_table = ls_pcie_of_match,
},
};
--
2.1.3
^ permalink raw reply related
* [PATCH 00/28] remove .owner for most platform_drivers: the missing bits
From: Wolfram Sang @ 2014-12-21 21:14 UTC (permalink / raw)
To: linux-kernel
Cc: linux-mips, alsa-devel, Wolfram Sang, linux-pci, dri-devel,
openipmi-developer, linux-samsung-soc, linux-scsi, ath5k-devel,
linux-rockchip, linux-serial, devicetree, linux-watchdog,
rtc-linux, linux-pm, linux-gpio, Dan Williams, linux-omap,
linux-arm-kernel, netdev, linux-usb, linux-wireless, iommu,
dmaengine, linuxppc-dev
Generated with coccinelle. The big cleanup was pulled in this merge window.
This series catches the bits fallen through. The patches shall go in via the
subsystem trees. If possible for 3.19 to increase consistency I'd say, but you
decide, of course.
cocci-file used:
@match1@
declarer name module_platform_driver;
declarer name module_platform_driver_probe;
declarer name for_each_node_by_type;
identifier __driver;
@@
(
module_platform_driver(__driver);
|
module_platform_driver_probe(__driver, ...);
)
@fix1 depends on match1@
identifier match1.__driver;
@@
static struct platform_driver __driver = {
.driver = {
- .owner = THIS_MODULE,
}
};
@match2@
identifier __driver;
@@
(
platform_driver_register(&__driver)
|
platform_driver_probe(&__driver, ...)
|
platform_create_bundle(&__driver, ...)
)
@fix2 depends on match2@
identifier match2.__driver;
@@
static struct platform_driver __driver = {
.driver = {
- .owner = THIS_MODULE,
}
};
Thanks again to Julia Lawall for support. And hey, we fixed a coccinelle bug on
the way :)
Wolfram Sang (28):
ARM: mach-exynos: drop owner assignment from platform_drivers
mips: lantiq: xway: drop owner assignment from platform_drivers
mips: pci: drop owner assignment from platform_drivers
char: ipmi: drop owner assignment from platform_drivers
cpufreq: drop owner assignment from platform_drivers
dma: drop owner assignment from platform_drivers
gpio: drop owner assignment from platform_drivers
gpu: drm: rockchip: drop owner assignment from platform_drivers
iommu: drop owner assignment from platform_drivers
net: ethernet: stmicro: stmmac: drop owner assignment from
platform_drivers
net: wireless: ath: ath5k: drop owner assignment from platform_drivers
of: drop owner assignment from platform_drivers
pci: host: drop owner assignment from platform_drivers
phy: drop owner assignment from platform_drivers
pinctrl: intel: drop owner assignment from platform_drivers
rtc: drop owner assignment from platform_drivers
scsi: drop owner assignment from platform_drivers
thermal: drop owner assignment from platform_drivers
thermal: int340x_thermal: drop owner assignment from platform_drivers
tty: serial: 8250: drop owner assignment from platform_drivers
usb: gadget: udc: bdc: drop owner assignment from platform_drivers
watchdog: drop owner assignment from platform_drivers
ASoC: intel: drop owner assignment from platform_drivers
ASoC: intel: sst: drop owner assignment from platform_drivers
ASoC: omap: drop owner assignment from platform_drivers
ASoC: pxa: drop owner assignment from platform_drivers
ASoC: samsung: drop owner assignment from platform_drivers
macintosh: drop owner assignment from platform_drivers
arch/arm/mach-exynos/pmu.c | 1 -
arch/mips/lantiq/xway/vmmc.c | 1 -
arch/mips/pci/pci-ar2315.c | 1 -
arch/mips/pci/pci-rt2880.c | 1 -
drivers/char/ipmi/ipmi_powernv.c | 1 -
drivers/cpufreq/ls1x-cpufreq.c | 1 -
drivers/dma/at_xdmac.c | 1 -
drivers/gpio/gpio-vf610.c | 1 -
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 -
drivers/iommu/rockchip-iommu.c | 1 -
drivers/macintosh/windfarm_pm112.c | 1 -
drivers/macintosh/windfarm_pm72.c | 1 -
drivers/macintosh/windfarm_rm31.c | 1 -
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 -
drivers/net/wireless/ath/ath5k/ahb.c | 1 -
drivers/of/unittest.c | 1 -
drivers/pci/host/pci-layerscape.c | 1 -
drivers/phy/phy-armada375-usb2.c | 1 -
drivers/phy/phy-berlin-usb.c | 1 -
drivers/phy/phy-miphy28lp.c | 1 -
drivers/pinctrl/intel/pinctrl-cherryview.c | 1 -
drivers/rtc/rtc-opal.c | 1 -
drivers/scsi/atari_scsi.c | 1 -
drivers/scsi/mac_scsi.c | 1 -
drivers/scsi/sun3_scsi.c | 1 -
drivers/thermal/int340x_thermal/int3400_thermal.c | 1 -
drivers/thermal/int340x_thermal/int3402_thermal.c | 1 -
drivers/thermal/rockchip_thermal.c | 1 -
drivers/tty/serial/8250/8250_omap.c | 1 -
drivers/usb/gadget/udc/bdc/bdc_core.c | 1 -
drivers/watchdog/cadence_wdt.c | 1 -
drivers/watchdog/meson_wdt.c | 1 -
sound/soc/intel/bytcr_dpcm_rt5640.c | 1 -
sound/soc/intel/cht_bsw_rt5672.c | 1 -
sound/soc/intel/sst/sst_acpi.c | 1 -
sound/soc/omap/omap-hdmi-audio.c | 1 -
sound/soc/pxa/spitz.c | 1 -
sound/soc/samsung/arndale_rt5631.c | 1 -
38 files changed, 38 deletions(-)
--
2.1.3
^ permalink raw reply
* Re: [PATCH] powerpc: powernv: Return to cpu offline loop when finished in KVM guest
From: Andreas Schwab @ 2014-12-21 14:13 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Alexander Graf, kvm-ppc, kvm
In-Reply-To: <20141203034840.GA612@iris.ozlabs.ibm.com>
arch/powerpc/kvm/built-in.o: In function `kvm_no_guest':
arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x724): undefined reference to `power7_wakeup_loss'
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* [PATCH 1/1] powerpc: Wire up sys_execveat() syscall
From: Pranith Kumar @ 2014-12-21 13:59 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Anton Blanchard, David Herrmann, Fabian Frederick,
open list:LINUX FOR POWERPC..., open list
Wire up sys_execveat(). This passes the selftests for the system call.
Check success of execveat(3, '../execveat', 0)... [OK]
Check success of execveat(5, 'execveat', 0)... [OK]
Check success of execveat(6, 'execveat', 0)... [OK]
Check success of execveat(-100, '/home/pranith/linux/...ftests/exec/execveat', 0)... [OK]
Check success of execveat(99, '/home/pranith/linux/...ftests/exec/execveat', 0)... [OK]
Check success of execveat(8, '', 4096)... [OK]
Check success of execveat(17, '', 4096)... [OK]
Check success of execveat(9, '', 4096)... [OK]
Check success of execveat(14, '', 4096)... [OK]
Check success of execveat(14, '', 4096)... [OK]
Check success of execveat(15, '', 4096)... [OK]
Check failure of execveat(8, '', 0) with ENOENT... [OK]
Check failure of execveat(8, '(null)', 4096) with EFAULT... [OK]
Check success of execveat(5, 'execveat.symlink', 0)... [OK]
Check success of execveat(6, 'execveat.symlink', 0)... [OK]
Check success of execveat(-100, '/home/pranith/linux/...xec/execveat.symlink', 0)... [OK]
Check success of execveat(10, '', 4096)... [OK]
Check success of execveat(10, '', 4352)... [OK]
Check failure of execveat(5, 'execveat.symlink', 256) with ELOOP... [OK]
Check failure of execveat(6, 'execveat.symlink', 256) with ELOOP... [OK]
Check failure of execveat(-100, '/home/pranith/linux/tools/testing/selftests/exec/execveat.symlink', 256) with ELOOP... [OK]
Check success of execveat(3, '../script', 0)... [OK]
Check success of execveat(5, 'script', 0)... [OK]
Check success of execveat(6, 'script', 0)... [OK]
Check success of execveat(-100, '/home/pranith/linux/...elftests/exec/script', 0)... [OK]
Check success of execveat(13, '', 4096)... [OK]
Check success of execveat(13, '', 4352)... [OK]
Check failure of execveat(18, '', 4096) with ENOENT... [OK]
Check failure of execveat(7, 'script', 0) with ENOENT... [OK]
Check success of execveat(16, '', 4096)... [OK]
Check success of execveat(16, '', 4096)... [OK]
Check success of execveat(4, '../script', 0)... [OK]
Check success of execveat(4, 'script', 0)... [OK]
Check success of execveat(4, '../script', 0)... [OK]
Check failure of execveat(4, 'script', 0) with ENOENT... [OK]
Check failure of execveat(5, 'execveat', 65535) with EINVAL... [OK]
Check failure of execveat(5, 'no-such-file', 0) with ENOENT... [OK]
Check failure of execveat(6, 'no-such-file', 0) with ENOENT... [OK]
Check failure of execveat(-100, 'no-such-file', 0) with ENOENT... [OK]
Check failure of execveat(5, '', 4096) with EACCES... [OK]
Check failure of execveat(5, 'Makefile', 0) with EACCES... [OK]
Check failure of execveat(11, '', 4096) with EACCES... [OK]
Check failure of execveat(12, '', 4096) with EACCES... [OK]
Check failure of execveat(99, '', 4096) with EBADF... [OK]
Check failure of execveat(99, 'execveat', 0) with EBADF... [OK]
Check failure of execveat(8, 'execveat', 0) with ENOTDIR... [OK]
Invoke copy of 'execveat' via filename of length 4093:
Check success of execveat(19, '', 4096)... [OK]
Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
Invoke copy of 'script' via filename of length 4093:
Check success of execveat(20, '', 4096)... [OK]
/bin/sh: 0: Can't open /dev/fd/5/xxxxxxx(... a long line of x's and y's, 0)... [OK]
Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
Tested on a 32-bit powerpc system.
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
arch/powerpc/include/asm/systbl.h | 1 +
arch/powerpc/include/asm/unistd.h | 2 +-
arch/powerpc/include/uapi/asm/unistd.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index ce9577d..91062ee 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -366,3 +366,4 @@ SYSCALL_SPU(seccomp)
SYSCALL_SPU(getrandom)
SYSCALL_SPU(memfd_create)
SYSCALL_SPU(bpf)
+COMPAT_SYS(execveat)
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index e0da021..36b79c3 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -12,7 +12,7 @@
#include <uapi/asm/unistd.h>
-#define __NR_syscalls 362
+#define __NR_syscalls 363
#define __NR__exit __NR_exit
#define NR_syscalls __NR_syscalls
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h
index f55351f..ef5b5b1 100644
--- a/arch/powerpc/include/uapi/asm/unistd.h
+++ b/arch/powerpc/include/uapi/asm/unistd.h
@@ -384,5 +384,6 @@
#define __NR_getrandom 359
#define __NR_memfd_create 360
#define __NR_bpf 361
+#define __NR_execveat 362
#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
--
1.9.1
^ permalink raw reply related
* Re: [PATCH] powerpc: Wire up sys_execveat() syscall
From: Pranith Kumar @ 2014-12-21 13:57 UTC (permalink / raw)
To: Stephen Rothwell
Cc: LKML, Fabian Frederick, Paul Mackerras, Anton Blanchard,
David Herrmann, Andrew Morton, open list:LINUX FOR POWERPC...
In-Reply-To: <20141221205604.5a280c9d@canb.auug.org.au>
On Sun, Dec 21, 2014 at 4:56 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Pranith,
>
> On Sat, 20 Dec 2014 11:47:18 -0500 Pranith Kumar <bobby.prani@gmail.com> wrote:
>>
>> Wire up sys_execveat(). This passes the selftests for the system call.
>
> Thanks for this, but ...
>
>> diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
>> index ce9577d..778844a 100644
>> --- a/arch/powerpc/include/asm/systbl.h
>> +++ b/arch/powerpc/include/asm/systbl.h
>> @@ -366,3 +366,4 @@ SYSCALL_SPU(seccomp)
>> SYSCALL_SPU(getrandom)
>> SYSCALL_SPU(memfd_create)
>> SYSCALL_SPU(bpf)
>> +SYSCALL_SPU(execveat)
>
> Given that it passes pointers into the kernel and looking at the execve
> system call, I assume that it should be COMPAT_SYS().
>
Yes, you are right. I will send in an updated patch. Thanks!
--
Pranith
^ permalink raw reply
* Re: [PATCH] misc: cxl: sysfs.c: Remove unused function
From: Rickard Strandqvist @ 2014-12-21 12:46 UTC (permalink / raw)
To: Michael Neuling; +Cc: linuxppc-dev, Ian Munsie, linux-kernel@vger.kernel.org
In-Reply-To: <1419134735.27324.41.camel@neuling.org>
2014-12-21 5:05 GMT+01:00 Michael Neuling <mikey@neuling.org>:
>> Remove the function mmio_size_show() that is not used anywhere.
>
> Did you compile check this patch?
>
> drivers/misc/cxl/sysfs.c:291:74: error: =E2=80=98mmio_size_show=E2=80=
=99 undeclared here (not in a function)
>
> It's used here:
> static struct device_attribute afu_attrs[] =3D {
> __ATTR_RO(mmio_size),
>
>> This was partially found by using a static code analysis program called =
cppcheck.
>
> Thanks for letting me know which tool to avoid :-)
>
> Mikey
>
>
>>
>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.=
se>
>> ---
>> drivers/misc/cxl/sysfs.c | 11 -----------
>> 1 file changed, 11 deletions(-)
>>
>> diff --git a/drivers/misc/cxl/sysfs.c b/drivers/misc/cxl/sysfs.c
>> index ce7ec06..0431ec3 100644
>> --- a/drivers/misc/cxl/sysfs.c
>> +++ b/drivers/misc/cxl/sysfs.c
>> @@ -102,17 +102,6 @@ static struct device_attribute afu_master_attrs[] =
=3D {
>>
>> /********* AFU attributes *******************************************=
*******/
>>
>> -static ssize_t mmio_size_show(struct device *device,
>> - struct device_attribute *attr,
>> - char *buf)
>> -{
>> - struct cxl_afu *afu =3D to_cxl_afu(device);
>> -
>> - if (afu->pp_size)
>> - return scnprintf(buf, PAGE_SIZE, "%llu\n", afu->pp_size);
>> - return scnprintf(buf, PAGE_SIZE, "%llu\n", afu->adapter->ps_size);
>> -}
>> -
>> static ssize_t reset_store_afu(struct device *device,
>> struct device_attribute *attr,
>> const char *buf, size_t count)
>
Hi
Sorry about that.
Strange because I compile everything as allyesconfig, allmodconfig and
allnoconfig.
Kind regards
Rickard Strandqvist
^ permalink raw reply
* Re: [PATCH] powerpc: Wire up sys_execveat() syscall
From: Stephen Rothwell @ 2014-12-21 9:56 UTC (permalink / raw)
To: Pranith Kumar
Cc: linux-kernel, Fabian Frederick, Paul Mackerras, Anton Blanchard,
David Herrmann, Andrew Morton, linuxppc-dev
In-Reply-To: <1419094041-14536-1-git-send-email-bobby.prani@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
Hi Pranith,
On Sat, 20 Dec 2014 11:47:18 -0500 Pranith Kumar <bobby.prani@gmail.com> wrote:
>
> Wire up sys_execveat(). This passes the selftests for the system call.
Thanks for this, but ...
> diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
> index ce9577d..778844a 100644
> --- a/arch/powerpc/include/asm/systbl.h
> +++ b/arch/powerpc/include/asm/systbl.h
> @@ -366,3 +366,4 @@ SYSCALL_SPU(seccomp)
> SYSCALL_SPU(getrandom)
> SYSCALL_SPU(memfd_create)
> SYSCALL_SPU(bpf)
> +SYSCALL_SPU(execveat)
Given that it passes pointers into the kernel and looking at the execve
system call, I assume that it should be COMPAT_SYS().
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH] misc: cxl: sysfs.c: Remove unused function
From: Michael Neuling @ 2014-12-21 4:05 UTC (permalink / raw)
To: Rickard Strandqvist; +Cc: linuxppc-dev, Ian Munsie, linux-kernel
In-Reply-To: <1419092024-6701-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
> Remove the function mmio_size_show() that is not used anywhere.
Did you compile check this patch?
drivers/misc/cxl/sysfs.c:291:74: error: =E2=80=98mmio_size_show=E2=80=99 =
undeclared here (not in a function)
It's used here:
static struct device_attribute afu_attrs[] =3D {
__ATTR_RO(mmio_size),
> This was partially found by using a static code analysis program called c=
ppcheck.
Thanks for letting me know which tool to avoid :-)
Mikey
>=20
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.s=
e>
> ---
> drivers/misc/cxl/sysfs.c | 11 -----------
> 1 file changed, 11 deletions(-)
>=20
> diff --git a/drivers/misc/cxl/sysfs.c b/drivers/misc/cxl/sysfs.c
> index ce7ec06..0431ec3 100644
> --- a/drivers/misc/cxl/sysfs.c
> +++ b/drivers/misc/cxl/sysfs.c
> @@ -102,17 +102,6 @@ static struct device_attribute afu_master_attrs[] =
=3D {
> =20
> /********* AFU attributes ********************************************=
******/
> =20
> -static ssize_t mmio_size_show(struct device *device,
> - struct device_attribute *attr,
> - char *buf)
> -{
> - struct cxl_afu *afu =3D to_cxl_afu(device);
> -
> - if (afu->pp_size)
> - return scnprintf(buf, PAGE_SIZE, "%llu\n", afu->pp_size);
> - return scnprintf(buf, PAGE_SIZE, "%llu\n", afu->adapter->ps_size);
> -}
> -
> static ssize_t reset_store_afu(struct device *device,
> struct device_attribute *attr,
> const char *buf, size_t count)
^ permalink raw reply
* [PATCH] arch: powerpc: platforms: embedded6xx: mpc7448_hpc2.c: Remove some unused functions
From: Rickard Strandqvist @ 2014-12-20 22:42 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras
Cc: linuxppc-dev, linux-kernel, Rickard Strandqvist
Removes some functions that are not used anywhere:
mpc7448_hpc2_halt() mpc7448_hpc2_power_off()
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index beeaf4a..df4ad95 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -156,17 +156,6 @@ void mpc7448_hpc2_restart(char *cmd)
for (;;) ; /* Spin until reset happens */
}
-void mpc7448_hpc2_power_off(void)
-{
- local_irq_disable();
- for (;;) ; /* No way to shut power off with software */
-}
-
-void mpc7448_hpc2_halt(void)
-{
- mpc7448_hpc2_power_off();
-}
-
/*
* Called very early, device-tree isn't unflattened
*/
--
1.7.10.4
^ permalink raw reply related
* Re: net: ucc: tbi phy detection broken by 058112c7efc9ef43bb511c137293dddbe6e42908
From: Lennart Sorensen @ 2014-12-20 17:40 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, linux-kernel@vger.kernel.org, linuxppc-dev,
David S. Miller, Sebastian Hesselbarth
In-Reply-To: <CAGVrzcbCCV_AL48R3iTGQqvdAM6NWuC1yDW5P+eh7rExE3fcow@mail.gmail.com>
On Sat, Dec 20, 2014 at 09:08:51AM -0800, Florian Fainelli wrote:
> There are some comments in ucc_geth that also lead me to believe this
> is a just a hack instead of a real Ethernet PHY device. Part of what I
> think got broken is because of this comment:
>
> /* Initialize TBI PHY interface for communicating with the
> * SERDES lynx PHY on the chip. We communicate with this PHY
> * through the MDIO bus on each controller, treating it as a
> * "normal" PHY at the address found in the UTBIPA register. We assume
> * that the UTBIPA register is valid. Either the MDIO bus code will set
> * it to a value that doesn't conflict with other PHYs on the bus, or the
> * value doesn't matter, as there are no other PHYs on the bus.
> */
>
> In particular this one:
>
> "Either the MDIO bus code will set
> * it to a value that doesn't conflict with other PHYs on the bus, or the
> * value doesn't matter, as there are no other PHYs on the bus."
>
> and what Sebastian removed did exactly that, we used the special MDIO
> broadcast address 0 to provide this "whatever". If this is such a
> requirement from the ucc_geth driver and TBI PHYs, maybe we should
> have this hack somewhere in the actual MDIO driver used by the
> ucc_geth driver instead, or set a flag/read the PHY connection mode
> and do this in drivers/of/of_mdio.c
Well it used to be that it would look for an unused address and assign
that, but that was changed to just use 0 unless the dtb specified an
address (essentially making specifying the address in the dtb mandetory).
Unfortunately after this patch, specifying it in the dtb isn't enough,
and the ucc_geth actually hits a null pointer because the tbi phy no
longer exists.
Before commit 28d8ea2d568534026ccda3e8936f5ea1e04a86a1, the tbi address
was in fact _not_ 0. So yes it used to set it to a non conflicting
address, but no longer does. It used to pick the highest unused address
for the tbi. Now it uses 0 unless the dtb specifies the address.
Unfortunately no one ever fixed that comment. It appears to be entirely
inaccurate.
In the case of the board I am dealing with, setting the address to 0
when it isn't used (port is not in SGMII or RTBI mode) actually breaks
things because we have a switch chip at address 0 on the MDIO bus that we
now can't reach. Adding explicit addresses for the tbi phy on each ucc
solves that though so that is no big deal. The fact that the ucc that
needs to actually use the tbi phy for SGMII or RTBI though can't find it
anymore because it is no longer created does seem like a problem, and it
isn't being created no matter what the address (it is not 0 in this case).
So right now it is broken with ucc_geth segfaulting if you use SGMII or
RTBI mode. I would love a clean solution to fixing it, although for
now reverting this patch has solved the problem.
--
Len Sorensen
^ permalink raw reply
* Re: net: ucc: tbi phy detection broken by 058112c7efc9ef43bb511c137293dddbe6e42908
From: Florian Fainelli @ 2014-12-20 17:08 UTC (permalink / raw)
To: Lennart Sorensen
Cc: netdev, linux-kernel@vger.kernel.org, linuxppc-dev,
David S. Miller, Sebastian Hesselbarth
In-Reply-To: <20141219034918.GX24110@csclub.uwaterloo.ca>
2014-12-18 19:49 GMT-08:00 Lennart Sorensen <lsorense@csclub.uwaterloo.ca>:
> I have been trying to move an 8360 based system from a 3.0 kernel to a
> 3.12 (on the way to 3.14 with ipipe/xenomai) kernel and encountered an
> oops in the ucc_geth driver when using RTBI mode on one of the ucc
> ports. I haven't managed to find any commits to of_mdio or ucc_geth or
> fsl_pq_mdio that would appear to address this problem, so I believe it
> is still present in the latest kernel, but have not confirmed that with
> testing yet.
>
> Commit 058112c7efc9ef43bb511c137293dddbe6e42908 appears to have broken
> ucc support for tbi phy detection.
>
> With the patch in place, I am unable to get the mdio bus to create phy
> devices for the tbi phy in the ucc on an 8360e, and the ucc_geth driver
> causes a kernel oops, while with the patch reverted, it does create them
> and the driver comes up and works.
>
> The tbi phy is needed when using a ucc in RTBI, TBI or SGMII mode.
>
> I am not convinced that the tbi phy really behaves quite like a real phy,
> which may be why get_phy_device does not work with it. Perhaps there
> is a better way to deal with the tbi phy on the ucc for this purpose.
There are some comments in ucc_geth that also lead me to believe this
is a just a hack instead of a real Ethernet PHY device. Part of what I
think got broken is because of this comment:
/* Initialize TBI PHY interface for communicating with the
* SERDES lynx PHY on the chip. We communicate with this PHY
* through the MDIO bus on each controller, treating it as a
* "normal" PHY at the address found in the UTBIPA register. We assume
* that the UTBIPA register is valid. Either the MDIO bus code will set
* it to a value that doesn't conflict with other PHYs on the bus, or the
* value doesn't matter, as there are no other PHYs on the bus.
*/
In particular this one:
"Either the MDIO bus code will set
* it to a value that doesn't conflict with other PHYs on the bus, or the
* value doesn't matter, as there are no other PHYs on the bus."
and what Sebastian removed did exactly that, we used the special MDIO
broadcast address 0 to provide this "whatever". If this is such a
requirement from the ucc_geth driver and TBI PHYs, maybe we should
have this hack somewhere in the actual MDIO driver used by the
ucc_geth driver instead, or set a flag/read the PHY connection mode
and do this in drivers/of/of_mdio.c
>
> Certainly as it is, this patch has caused a regression though, although
> probably not very many systems with ucc ports actually use one of the
> affected modes so the damage isn't that great.
>
> --
> Len Sorensen
--
Florian
^ permalink raw reply
* [PATCH] powerpc: Wire up sys_execveat() syscall
From: Pranith Kumar @ 2014-12-20 16:47 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Anton Blanchard, David Herrmann, Andrew Morton, Fabian Frederick,
open list:LINUX FOR POWERPC..., open list
Wire up sys_execveat(). This passes the selftests for the system call.
Check success of execveat(3, '../execveat', 0)... [OK]
Check success of execveat(5, 'execveat', 0)... [OK]
Check success of execveat(6, 'execveat', 0)... [OK]
Check success of execveat(-100, '/home/pranith/linux/...ftests/exec/execveat', 0)... [OK]
Check success of execveat(99, '/home/pranith/linux/...ftests/exec/execveat', 0)... [OK]
Check success of execveat(8, '', 4096)... [OK]
Check success of execveat(17, '', 4096)... [OK]
Check success of execveat(9, '', 4096)... [OK]
Check success of execveat(14, '', 4096)... [OK]
Check success of execveat(14, '', 4096)... [OK]
Check success of execveat(15, '', 4096)... [OK]
Check failure of execveat(8, '', 0) with ENOENT... [OK]
Check failure of execveat(8, '(null)', 4096) with EFAULT... [OK]
Check success of execveat(5, 'execveat.symlink', 0)... [OK]
Check success of execveat(6, 'execveat.symlink', 0)... [OK]
Check success of execveat(-100, '/home/pranith/linux/...xec/execveat.symlink', 0)... [OK]
Check success of execveat(10, '', 4096)... [OK]
Check success of execveat(10, '', 4352)... [OK]
Check failure of execveat(5, 'execveat.symlink', 256) with ELOOP... [OK]
Check failure of execveat(6, 'execveat.symlink', 256) with ELOOP... [OK]
Check failure of execveat(-100, '/home/pranith/linux/tools/testing/selftests/exec/execveat.symlink', 256) with ELOOP... [OK]
Check success of execveat(3, '../script', 0)... [OK]
Check success of execveat(5, 'script', 0)... [OK]
Check success of execveat(6, 'script', 0)... [OK]
Check success of execveat(-100, '/home/pranith/linux/...elftests/exec/script', 0)... [OK]
Check success of execveat(13, '', 4096)... [OK]
Check success of execveat(13, '', 4352)... [OK]
Check failure of execveat(18, '', 4096) with ENOENT... [OK]
Check failure of execveat(7, 'script', 0) with ENOENT... [OK]
Check success of execveat(16, '', 4096)... [OK]
Check success of execveat(16, '', 4096)... [OK]
Check success of execveat(4, '../script', 0)... [OK]
Check success of execveat(4, 'script', 0)... [OK]
Check success of execveat(4, '../script', 0)... [OK]
Check failure of execveat(4, 'script', 0) with ENOENT... [OK]
Check failure of execveat(5, 'execveat', 65535) with EINVAL... [OK]
Check failure of execveat(5, 'no-such-file', 0) with ENOENT... [OK]
Check failure of execveat(6, 'no-such-file', 0) with ENOENT... [OK]
Check failure of execveat(-100, 'no-such-file', 0) with ENOENT... [OK]
Check failure of execveat(5, '', 4096) with EACCES... [OK]
Check failure of execveat(5, 'Makefile', 0) with EACCES... [OK]
Check failure of execveat(11, '', 4096) with EACCES... [OK]
Check failure of execveat(12, '', 4096) with EACCES... [OK]
Check failure of execveat(99, '', 4096) with EBADF... [OK]
Check failure of execveat(99, 'execveat', 0) with EBADF... [OK]
Check failure of execveat(8, 'execveat', 0) with ENOTDIR... [OK]
Invoke copy of 'execveat' via filename of length 4093:
Check success of execveat(19, '', 4096)... [OK]
Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
Invoke copy of 'script' via filename of length 4093:
Check success of execveat(20, '', 4096)... [OK]
/bin/sh: 0: Can't open /dev/fd/5/xxxxxxx(... a long line of x's and y's, 0)... [OK]
Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
Tested on a 32-bit powerpc system.
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
arch/powerpc/include/asm/systbl.h | 1 +
arch/powerpc/include/asm/unistd.h | 2 +-
arch/powerpc/include/uapi/asm/unistd.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index ce9577d..778844a 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -366,3 +366,4 @@ SYSCALL_SPU(seccomp)
SYSCALL_SPU(getrandom)
SYSCALL_SPU(memfd_create)
SYSCALL_SPU(bpf)
+SYSCALL_SPU(execveat)
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index e0da021..36b79c3 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -12,7 +12,7 @@
#include <uapi/asm/unistd.h>
-#define __NR_syscalls 362
+#define __NR_syscalls 363
#define __NR__exit __NR_exit
#define NR_syscalls __NR_syscalls
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h
index f55351f..ef5b5b1 100644
--- a/arch/powerpc/include/uapi/asm/unistd.h
+++ b/arch/powerpc/include/uapi/asm/unistd.h
@@ -384,5 +384,6 @@
#define __NR_getrandom 359
#define __NR_memfd_create 360
#define __NR_bpf 361
+#define __NR_execveat 362
#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
--
2.1.3
^ permalink raw reply related
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