* Re: [PATCH RFC] ARM: dts: add support for Turris Omnia
From: tomas.hlavacek-x+rMaJPWets @ 2016-11-14 12:23 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Jason Cooper, Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Martin Strbačka, Rob Herring, Mark Rutland,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <20161105203841.9661-1-uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
Hello Uwe and all!
On Sat, Nov 5, 2016 at 9:38 PM, Uwe Kleine-König
<uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org> wrote:
> This machine is an open hardware router by cz.nic driven by a
> Marvell Armada 385.
>
> Signed-off-by: Uwe Kleine-König <uwe-rXY34ruvC2xidJT2blvkqNi2O/JbrIOy@public.gmane.org>
> ---
>
> Hello,
>
> the following components are working:
>
> - WAN port
> - eMMC
But I not not sure about DDR50 mode. At least with kernel 4.4, that we
use in production, we had to limit to SDR50 to overcome I/O errors and
communication instability, if I can remember it correctly. So it might
need more testing with the current kernel.
>
> - UART0
> - USB
It is worth noting that the USB 2.0 interface of Armada 385 is wired to
USB pinout of the last (right-most) PCIe connector. The two USB3
interfaces routed through SERDES 1 and 3 go directly to the external
USB connectors.
>
> Still missing is support for the switch. Wireless fails to probe,
> didn't
> debug this up to now. SFP is untested as is UART1.
Actually SFP is connected to SGMII interface of eth1, which is routed
through SERDES 5. The SGMII line is shared between the SFP and metallic
PHY 88E1514. There is a autonomous high-speed switch connected to the
SFPDET signal from SFP cage. It disconnects the metallic SFP and
connects SGMII to SFP once the module is connected.
The SFP is also connected to the I2C mux port 4 and to GPIO expander
for reading/driving SFPDET, LOS, TXFLT, TXDIS signals:
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "okay";
clock-frequency = <100000>;
i2cmux@70 {
compatible = "nxp,pca9547";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x70>;
status = "okay";
...
i2c@7 {
/* SFP+ GPIO expander */
#address-cells = <1>;
#size-cells = <0>;
reg = <7>;
sfpgpio: gpio@71 {
compatible = "nxp,pca9538";
reg = <0x71>;
interrupt-parent = <&gpio1>;
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
gpio-controller;
#gpio-cells = <2>;
};
};
};
};
We have our proprietary support hacked onto mvneta driver for
disconnecting PHY on the fly. It is a bit nasty, so I suggest to ignore
SFP in this DTS altogether and let's wait till "phylink based SFP
module support" or something alike hits upstream, so we can base the
SFP support on solid code; unless somebody has a better idea, of course.
>
>
> diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts
> b/arch/arm/boot/dts/armada-385-turris-omnia.dts
> new file mode 100644
> index 000000000000..d3cd8a4d713d
> --- /dev/null
> +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts
> @@ -0,0 +1,246 @@
...
> +
> + /* USB part of the eSATA/USB 2.0 port */
This comment is perhaps some error inherited from my development DTS.
We do not have any eSATA, perhaps PCIe/USB 2.0 slot.
>
> + usb@58000 {
> + status = "okay";
> + };
> +
> +
> +ð0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&ge0_rgmii_pins>;
> + status = "okay";
> + phy-mode = "rgmii-id";
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + };
> +};
> +
> +ð1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&ge1_rgmii_pins>;
> + status = "okay";
> + phy-mode = "rgmii-id";
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + };
> +};
> +
Actually eth0 and eth1 (both are RGMII) are connected to the 88E6176
switch. The problem is that from what I have read so far the switch can
not operate in DSA mode with two CPU ports. We currently operate the
switch in "normal mode" with the eth0 and eth1 set to fixed-link
1000/full and with proprietary driver (derived from OpenWRT switch
drivers). I would say that these records for eth0 and eth1 are
therefore redundant, because it does nothing without the switch support
and it would most likely change once we have DSA driver (using only
eth0).
Tomas
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH RFC] ARM: dts: add support for Turris Omnia
From: tomas.hlavacek at nic.cz @ 2016-11-14 12:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161105203841.9661-1-uwe@kleine-koenig.org>
Hello Uwe and all!
On Sat, Nov 5, 2016 at 9:38 PM, Uwe Kleine-K?nig
<uwe@kleine-koenig.org> wrote:
> This machine is an open hardware router by cz.nic driven by a
> Marvell Armada 385.
>
> Signed-off-by: Uwe Kleine-K?nig <uwe@kleine-koenig.org>
> ---
>
> Hello,
>
> the following components are working:
>
> - WAN port
> - eMMC
But I not not sure about DDR50 mode. At least with kernel 4.4, that we
use in production, we had to limit to SDR50 to overcome I/O errors and
communication instability, if I can remember it correctly. So it might
need more testing with the current kernel.
>
> - UART0
> - USB
It is worth noting that the USB 2.0 interface of Armada 385 is wired to
USB pinout of the last (right-most) PCIe connector. The two USB3
interfaces routed through SERDES 1 and 3 go directly to the external
USB connectors.
>
> Still missing is support for the switch. Wireless fails to probe,
> didn't
> debug this up to now. SFP is untested as is UART1.
Actually SFP is connected to SGMII interface of eth1, which is routed
through SERDES 5. The SGMII line is shared between the SFP and metallic
PHY 88E1514. There is a autonomous high-speed switch connected to the
SFPDET signal from SFP cage. It disconnects the metallic SFP and
connects SGMII to SFP once the module is connected.
The SFP is also connected to the I2C mux port 4 and to GPIO expander
for reading/driving SFPDET, LOS, TXFLT, TXDIS signals:
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "okay";
clock-frequency = <100000>;
i2cmux at 70 {
compatible = "nxp,pca9547";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x70>;
status = "okay";
...
i2c at 7 {
/* SFP+ GPIO expander */
#address-cells = <1>;
#size-cells = <0>;
reg = <7>;
sfpgpio: gpio at 71 {
compatible = "nxp,pca9538";
reg = <0x71>;
interrupt-parent = <&gpio1>;
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
gpio-controller;
#gpio-cells = <2>;
};
};
};
};
We have our proprietary support hacked onto mvneta driver for
disconnecting PHY on the fly. It is a bit nasty, so I suggest to ignore
SFP in this DTS altogether and let's wait till "phylink based SFP
module support" or something alike hits upstream, so we can base the
SFP support on solid code; unless somebody has a better idea, of course.
>
>
> diff --git a/arch/arm/boot/dts/armada-385-turris-omnia.dts
> b/arch/arm/boot/dts/armada-385-turris-omnia.dts
> new file mode 100644
> index 000000000000..d3cd8a4d713d
> --- /dev/null
> +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts
> @@ -0,0 +1,246 @@
...
> +
> + /* USB part of the eSATA/USB 2.0 port */
This comment is perhaps some error inherited from my development DTS.
We do not have any eSATA, perhaps PCIe/USB 2.0 slot.
>
> + usb at 58000 {
> + status = "okay";
> + };
> +
> +
> +ð0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&ge0_rgmii_pins>;
> + status = "okay";
> + phy-mode = "rgmii-id";
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + };
> +};
> +
> +ð1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&ge1_rgmii_pins>;
> + status = "okay";
> + phy-mode = "rgmii-id";
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + };
> +};
> +
Actually eth0 and eth1 (both are RGMII) are connected to the 88E6176
switch. The problem is that from what I have read so far the switch can
not operate in DSA mode with two CPU ports. We currently operate the
switch in "normal mode" with the eth0 and eth1 set to fixed-link
1000/full and with proprietary driver (derived from OpenWRT switch
drivers). I would say that these records for eth0 and eth1 are
therefore redundant, because it does nothing without the switch support
and it would most likely change once we have DSA driver (using only
eth0).
Tomas
^ permalink raw reply
* [PATCH] btrfs: qgroup: Prevent qgroup->reserved from going subzero
From: Goldwyn Rodrigues @ 2016-11-14 12:22 UTC (permalink / raw)
To: stable; +Cc: Goldwyn Rodrigues, David Sterba
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Backport for stable 4.4.y
commit 0b34c261e235a5c74dcf78bd305845bd15fe2b42 upstream.
While free'ing qgroup->reserved resources, we much check if
the page has not been invalidated by a truncate operation
by checking if the page is still dirty before reducing the
qgroup resources. Resources in such a case are free'd when
the entire extent is released by delayed_ref.
This fixes a double accounting while releasing resources
in case of truncating a file, reproduced by the following testcase.
SCRATCH_DEV=/dev/vdb
SCRATCH_MNT=/mnt
mkfs.btrfs -f $SCRATCH_DEV
mount -t btrfs $SCRATCH_DEV $SCRATCH_MNT
cd $SCRATCH_MNT
btrfs quota enable $SCRATCH_MNT
btrfs subvolume create a
btrfs qgroup limit 500m a $SCRATCH_MNT
sync
for c in {1..15}; do
dd if=/dev/zero bs=1M count=40 of=$SCRATCH_MNT/a/file;
done
sleep 10
sync
sleep 5
touch $SCRATCH_MNT/a/newfile
echo "Removing file"
rm $SCRATCH_MNT/a/file
Fixes: b9d0b38928 ("btrfs: Add handler for invalidate page")
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/inode.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 4bc9dbf..3cff652 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8691,9 +8691,14 @@ static void btrfs_invalidatepage(struct page *page, unsigned int offset,
* So even we call qgroup_free_data(), it won't decrease reserved
* space.
* 2) Not written to disk
- * This means the reserved space should be freed here.
+ * This means the reserved space should be freed here. However,
+ * if a truncate invalidates the page (by clearing PageDirty)
+ * and the page is accounted for while allocating extent
+ * in btrfs_check_data_free_space() we let delayed_ref to
+ * free the entire extent.
*/
- btrfs_qgroup_free_data(inode, page_start, PAGE_CACHE_SIZE);
+ if (PageDirty(page))
+ btrfs_qgroup_free_data(inode, page_start, PAGE_SIZE);
if (!inode_evicting) {
clear_extent_bit(tree, page_start, page_end,
EXTENT_LOCKED | EXTENT_DIRTY |
--
2.10.0
^ permalink raw reply related
* Re: Outreachy golang bindings planning
From: Ronald Rojas @ 2016-11-14 12:21 UTC (permalink / raw)
To: Lars Kurth; +Cc: George Dunlap, xen-devel@lists.xen.org
In-Reply-To: <00A9968E-215B-45BE-8038-49AB8B02F39B@gmail.com>
On Fri, Nov 11, 2016 at 12:42:52PM +0000, Lars Kurth wrote:
> Ronald,
> I am not sure whether you checked the Outreachy page and apologies for getting back late, but this project has been accepted. Let me know of your own blog and whether you'd be willing to write a guest blog or let me cover a quick blog on blog.xenproject.org as an introduction to the community. I would need a few sentences about yourself, what motivates you, what you are trying to achieve though.
Hi Lars,
I just found out I was accepted to the outreachy program a few days ago, so
thanks Lars and George for accepting the project! I don't have a blog but I
know that the outreachy program reccomends a blog for the program. I will
probably be setting up a wordpress site in the next few days and will let you
know when I get that done.
For the Xen Project blog you can use the following:
I'm a 3rd year student at New York University studying computer science. I'm
also from New York City so New York has always been my home. This will be my
first time working in a FOSS project and I'm really looking forward to it.
When I first started applying to outreachy was when I first learned
about Xen. I thought the idea was really cool and it's something that I was
already interested in so I decided to put my efforts into this project. What I
wanted from this project was a good way to get involved with open source
projects and to start contibuting. Once the internship is over I think I will
try to complete my project andd try to contribute to xen in other areas as
well.
Feel free to paraphase what I wrote or let me know if you need more
information.
Ronald Rojas
>
> > On 17 Oct 2016, at 18:15, Ronald Rojas <ronladred@gmail.com> wrote:
> >
> > On Wed, Oct 12, 2016 at 12:49:18PM +0100, George Dunlap wrote:
> >> Hey Ronald,
> >>
> >> My ultimate vision for the libxl golang project is to have the following:
> >>
> >> - Golang bindings for all core libxl functionality
> >> - A test program which exersises as much of that functionality as is
> >> reasonable
> >>
> >> The C libxl library has two components: parts that are written by hand
> >> (such as libxl.h and libxl_*.c), and parts that are generated
> >> programmatically by the IDL compiler (such as _libxl_types.h and
> >> _libxl_types.c). I think the end goal should be to extend the IDL to
> >> generate at least the Golang types, and probably a lot of the "helper"
> >> methods as well (such as ${TYPE}.String() or ${TYPE}.FromString()).
> >>
> >> But before diving into the I think it makes sense to first implement a
> >> core set of functionality by hand, to see what the shape of the library
> >> looks like, then implement the type-generation part of the IDL. Other
> >> things we might do with the IDL, such as generation of utility methods,
> >> we can add in at later points as well.
> >>
> >> At the bottom of this mail, I've got all the libxl functions from
> >> libxl.h sorted into what seems to me a useful order to start working on
> >> things.
> >>
> >> I list here the "headers". This is a *lot* of functionality; I very
> >> greatly doubt that it will be possible to get all of it implemented and
> >> tested during the internship. I'd much rather have a decent core set of
> >> functionality with a really good testing than attempt to get all the
> >> functions "implemented" in a way which nobody knows if it works.
> >>
> >> If we can get the basic IDL working, and stuff implemented and
> >> well-tested through "Secondary host operations", I think the internship
> >> will have been a solid success. If we get through "Devices: PCI", I
> >> think it will have been a wild success. :-)
> >>
> >
> > It looks like due to the large timezone difference that we have I'm not able to
> > catch you on #xen-devel a lot of the time so I may start relying on email
> > a bit more, anyway...
> >
> > I made a quick timeline in a google doc that outlines what I think I can
> > accomplish during the duration of the Outreachy internship which I will link
> > below(1). I gave it a fairly optimistic view of what could be done so that if
> > anything happens, like an emergency or maybe something is harder then expected,
> > enough should still be accomplished during the internship period so that it'll
> > still be considered a success. Feel free to edit it however you want.
> >
> > Since the application would have been due later today, October 17 7:00PM UTC,
> > I tentatively submitted the application. It can be edited until November 8th
> > so if you think I should change anything let me know and I'll do that as soon
> > as I can. I'm not sure if you can view my application now but I will provide
> > a link to a google doc that will have exactly what I submitted on my
> > application(2). You should be able to edit it if you want to.
> >
> > Notes on school:
> > I have most of my midterms next week so I probably won't be able to contribute
> > much then. I will try to finish all of the major problems this week, like
> > finalizing the application and the project timeline. Then in two weeks I will
> > have the time to do some more work, like creating the Makefile for the golang
> > binding project.
> >
> > Links:
> > (1) https://docs.google.com/document/d/1X1Xyb8YBGcBsfDH1oDsUPQM8lwCLYrJQmgV52HStY6o/edit?usp=sharing
> > (2) https://docs.google.com/document/d/1yfVc5eJlIeQYiccuvu6YMLUm4_uGJOypOYjM_zmd6HQ/edit?usp=sharing
> >
> > Thanks,
> > Ronald Rojas
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > https://lists.xen.org/xen-devel
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v2 0/5] [RFC] Add HAX support
From: Stefan Weil @ 2016-11-14 12:21 UTC (permalink / raw)
To: Vincent Palatin, qemu-devel; +Cc: Paolo Bonzini
In-Reply-To: <cover.1478863621.git.vpalatin@chromium.org>
Am 11.11.2016 um 12:28 schrieb Vincent Palatin:
> I took a stab at trying to rebase/upstream the support for Intel HAXM.
> (Hardware Accelerated Execution Manager).
> Intel HAX is kernel-based hardware acceleration module for Windows and MacOSX.
>
> I have based my work on the last version of the source code I found:
> the emu-2.2-release branch in the external/qemu-android repository as used by
> the Android emulator.
> In patch 2/5, I have forward-ported the core HAX code mostly unmodified from
> there, I just did some minor touch up to make it build and run properly,
> and fixed the style issues to go through checkpatch.pl.
> I have not included the Darwin support.
> It might contain some outdated constructs and probably requires more
> attention (thus the 'RFC' for this patchset).
>
> In patch 3/5, I'm removing a good chunk of the support for CPUs without UG mode
> as advised by Paolo to simplify the initial version.
>
> In patch 5/5, I have put the plumbing into the QEMU code base, I did some clean
> up there and it is reasonably intrusive: i.e.
> Makefile.target | 1 +
> configure | 18 ++++++++++
> cpus.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++-
> exec.c | 16 +++++++++
> hw/intc/apic_common.c | 3 +-
> include/qom/cpu.h | 5 +++
> include/sysemu/hw_accel.h | 9 +++++
> qemu-options.hx | 11 ++++++
> target-i386/Makefile.objs | 7 ++++
> vl.c | 15 ++++++--
> 10 files changed, 167 insertions(+), 5 deletions(-)
>
> The qemu_cpu_kick_thread mess in cpus.c is probably still not perfact though.
>
> The patch 1/5 just extracts from KVM specific header the cpu_synchronize_
> functions that HAX is also using.
>
> I have tested the end result on a Windows 10 Pro machine (with UG support)
> with the Intel HAXM module 6.0.4 and a large ChromiumOS x86_64 image to
> exercise various code paths. It looks stable.
> I also did a quick regression testing of the integration by running a Linux
> build with KVM enabled.
A full build for Windows needs the patch below to
fix missing declarations, otherwise it fails with
compiler warnings and linker errors.
Stefan
>From 91481639a1005ed3278eb55c77c99bb1bcc135ce Mon Sep 17 00:00:00 2001
From: Stefan Weil <sw@weilnetz.de>
Date: Mon, 14 Nov 2016 13:09:53 +0100
Subject: [PATCH] Fix include statements for HAXM support
We need sysemu/hw_accel.h. As sysemu/hw_accel.h already includes
sysemu/kvm.h, that one can be removed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
hw/ppc/pnv_xscom.c | 2 +-
hw/ppc/ppce500_spin.c | 4 ++--
hw/ppc/spapr.c | 2 +-
hw/ppc/spapr_hcall.c | 2 +-
hw/s390x/s390-pci-inst.c | 1 +
target-ppc/mmu-hash64.c | 2 +-
target-ppc/translate_init.c | 2 +-
target-s390x/gdbstub.c | 1 +
8 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
index 5aaa264..abcb85d 100644
--- a/hw/ppc/pnv_xscom.c
+++ b/hw/ppc/pnv_xscom.c
@@ -20,7 +20,7 @@
#include "qapi/error.h"
#include "hw/hw.h"
#include "qemu/log.h"
-#include "sysemu/kvm.h"
+#include "sysemu/hw_accel.h"
#include "target-ppc/cpu.h"
#include "hw/sysbus.h"
diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c
index cf958a9..eb219ab 100644
--- a/hw/ppc/ppce500_spin.c
+++ b/hw/ppc/ppce500_spin.c
@@ -29,9 +29,9 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
-#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
-#include "sysemu/kvm.h"
+#include "sysemu/hw_accel.h"
+#include "sysemu/sysemu.h"
#include "e500.h"
#define MAX_CPUS 32
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 0cbab24..174f4d3 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -36,7 +36,7 @@
#include "sysemu/device_tree.h"
#include "sysemu/block-backend.h"
#include "sysemu/cpus.h"
-#include "sysemu/kvm.h"
+#include "sysemu/hw_accel.h"
#include "kvm_ppc.h"
#include "migration/migration.h"
#include "mmu-hash64.h"
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 9a9bedf..b2a8e48 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1,5 +1,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "sysemu/hw_accel.h"
#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "cpu.h"
@@ -9,7 +10,6 @@
#include "mmu-hash64.h"
#include "cpu-models.h"
#include "trace.h"
-#include "sysemu/kvm.h"
#include "kvm_ppc.h"
#include "hw/ppc/spapr_ovec.h"
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index 0864d9b..4d0775c 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -18,6 +18,7 @@
#include "s390-pci-bus.h"
#include "exec/memory-internal.h"
#include "qemu/error-report.h"
+#include "sysemu/hw_accel.h"
/* #define DEBUG_S390PCI_INST */
#ifdef DEBUG_S390PCI_INST
diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c
index fdb7a78..0efc8c6 100644
--- a/target-ppc/mmu-hash64.c
+++ b/target-ppc/mmu-hash64.c
@@ -23,7 +23,7 @@
#include "exec/exec-all.h"
#include "exec/helper-proto.h"
#include "qemu/error-report.h"
-#include "sysemu/kvm.h"
+#include "sysemu/hw_accel.h"
#include "kvm_ppc.h"
#include "mmu-hash64.h"
#include "exec/log.h"
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 208fa1e..1a049af 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -21,10 +21,10 @@
#include "qemu/osdep.h"
#include "disas/bfd.h"
#include "exec/gdbstub.h"
-#include "sysemu/kvm.h"
#include "kvm_ppc.h"
#include "sysemu/arch_init.h"
#include "sysemu/cpus.h"
+#include "sysemu/hw_accel.h"
#include "cpu-models.h"
#include "mmu-hash32.h"
#include "mmu-hash64.h"
diff --git a/target-s390x/gdbstub.c b/target-s390x/gdbstub.c
index 3d223de..3c652fb 100644
--- a/target-s390x/gdbstub.c
+++ b/target-s390x/gdbstub.c
@@ -23,6 +23,7 @@
#include "exec/exec-all.h"
#include "exec/gdbstub.h"
#include "qemu/bitops.h"
+#include "sysemu/hw_accel.h"
int s390_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
{
--
2.10.2
^ permalink raw reply related
* [PATCH 4/5] rsi: Added support for antenna selection
From: Prameela Rani Garnepudi @ 2016-11-14 12:17 UTC (permalink / raw)
To: linux-wireless
Cc: kvalo, johannes.berg, hofrat, xypron.glpk, prameela.garnepudi,
Prameela Rani Garnepudi
RSI 9113 device supports single antenna for tx and rx. Support for using
external is added. This can be configured from user space using iw.
Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 78 +++++++++++++++++++++++++++++
drivers/net/wireless/rsi/rsi_91x_mgmt.c | 33 ++++++++++++
drivers/net/wireless/rsi/rsi_main.h | 1 +
drivers/net/wireless/rsi/rsi_mgmt.h | 4 ++
4 files changed, 116 insertions(+)
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index ba21608..07314ea 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -1071,6 +1071,82 @@ static int rsi_mac80211_sta_remove(struct ieee80211_hw *hw,
return 0;
}
+/**
+ * rsi_mac80211_set_antenna() - This function is used to configure
+ * tx and rx antennas.
+ * @hw: Pointer to the ieee80211_hw structure.
+ * @tx_ant: Bitmap for tx antenna
+ * @rx_ant: Bitmap for rx antenna
+ *
+ * Return: 0 on success, -1 on failure.
+ */
+static int rsi_mac80211_set_antenna(struct ieee80211_hw *hw,
+ u32 tx_ant, u32 rx_ant)
+{
+ struct rsi_hw *adapter = hw->priv;
+ struct rsi_common *common = adapter->priv;
+ u32 antenna = 0;
+
+ if (tx_ant > 1 || rx_ant > 1) {
+ rsi_dbg(ERR_ZONE,
+ "Invalid antenna selection (tx: %d, rx:%d)\n",
+ tx_ant, rx_ant);
+ rsi_dbg(ERR_ZONE,
+ "Use 0 for int_ant, 1 for ext_ant\n");
+ return -EINVAL;
+ }
+
+ rsi_dbg(INFO_ZONE, "%s: Antenna map Tx %x Rx %d\n",
+ __func__, tx_ant, rx_ant);
+
+ mutex_lock(&common->mutex);
+
+ antenna = tx_ant ? ANTENNA_SEL_UFL : ANTENNA_SEL_INT;
+ if (common->ant_in_use != antenna)
+ if (rsi_set_antenna(common, antenna))
+ goto fail_set_antenna;
+
+ rsi_dbg(INFO_ZONE, "(%s) Antenna path configured successfully\n",
+ tx_ant ? "UFL" : "INT");
+
+ common->ant_in_use = antenna;
+
+ mutex_unlock(&common->mutex);
+
+ return 0;
+
+fail_set_antenna:
+ rsi_dbg(ERR_ZONE, "%s: Failed.\n", __func__);
+ mutex_unlock(&common->mutex);
+ return -EINVAL;
+}
+
+/**
+ * rsi_mac80211_get_antenna() - This function is used to configure
+ * tx and rx antennas.
+ *
+ * @hw: Pointer to the ieee80211_hw structure.
+ * @tx_ant: Bitmap for tx antenna
+ * @rx_ant: Bitmap for rx antenna
+ *
+ * Return: 0 on success, -1 on failure.
+ */
+static int rsi_mac80211_get_antenna(struct ieee80211_hw *hw,
+ u32 *tx_ant, u32 *rx_ant)
+{
+ struct rsi_hw *adapter = hw->priv;
+ struct rsi_common *common = adapter->priv;
+
+ mutex_lock(&common->mutex);
+
+ *tx_ant = (common->ant_in_use == ANTENNA_SEL_UFL) ? 1 : 0;
+ *rx_ant = 0;
+
+ mutex_unlock(&common->mutex);
+
+ return 0;
+}
+
static struct ieee80211_ops mac80211_ops = {
.tx = rsi_mac80211_tx,
.start = rsi_mac80211_start,
@@ -1087,6 +1163,8 @@ static struct ieee80211_ops mac80211_ops = {
.ampdu_action = rsi_mac80211_ampdu_action,
.sta_add = rsi_mac80211_sta_add,
.sta_remove = rsi_mac80211_sta_remove,
+ .set_antenna = rsi_mac80211_set_antenna,
+ .get_antenna = rsi_mac80211_get_antenna,
};
/**
diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index 2e8e5dc..16dc3ac 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -1326,6 +1326,39 @@ int rsi_send_rx_filter_frame(struct rsi_common *common, u16 rx_filter_word)
}
/**
+ * rsi_set_antenna() - This fuction handles antenna selection functionality.
+ *
+ * @common: Pointer to the driver private structure.
+ * @antenna: bitmap for tx antenna selection
+ *
+ * Return: 0 on Success, < 0 on failure
+ */
+int rsi_set_antenna(struct rsi_common *common,
+ u8 antenna)
+{
+ struct rsi_mac_frame *mgmt_frame;
+ struct sk_buff *skb;
+
+ skb = dev_alloc_skb(FRAME_DESC_SZ);
+ if (!skb) {
+ rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
+ __func__);
+ return -ENOMEM;
+ }
+
+ memset(skb->data, 0, FRAME_DESC_SZ);
+ mgmt_frame = (struct rsi_mac_frame *)skb->data;
+
+ mgmt_frame->desc_word[1] = cpu_to_le16(ANT_SEL_FRAME);
+ mgmt_frame->desc_word[3] = cpu_to_le16(antenna & 0x00ff);
+ mgmt_frame->desc_word[0] = cpu_to_le16(RSI_WIFI_MGMT_Q << 12);
+
+ skb_put(skb, FRAME_DESC_SZ);
+
+ return rsi_send_internal_mgmt_frame(common, skb);
+}
+
+/**
* rsi_handle_ta_confirm_type() - This function handles the confirm frames.
* @common: Pointer to the driver private structure.
* @msg: Pointer to received packet.
diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h
index 3938f13..2405b30 100644
--- a/drivers/net/wireless/rsi/rsi_main.h
+++ b/drivers/net/wireless/rsi/rsi_main.h
@@ -206,6 +206,7 @@ struct rsi_common {
bool hw_data_qs_blocked;
int tx_power;
+ u8 ant_in_use;
};
struct rsi_hw {
diff --git a/drivers/net/wireless/rsi/rsi_mgmt.h b/drivers/net/wireless/rsi/rsi_mgmt.h
index 6547ae7..1111c07 100644
--- a/drivers/net/wireless/rsi/rsi_mgmt.h
+++ b/drivers/net/wireless/rsi/rsi_mgmt.h
@@ -141,6 +141,9 @@
#define RSI_SUPP_FILTERS (FIF_ALLMULTI | FIF_PROBE_REQ |\
FIF_BCN_PRBRESP_PROMISC)
+#define ANTENNA_SEL_INT 0x02 /* RF_OUT_2 / Integerated */
+#define ANTENNA_SEL_UFL 0x03 /* RF_OUT_1 / U.FL */
+
/* Rx filter word definitions */
#define PROMISCOUS_MODE BIT(0)
#define ALLOW_DATA_ASSOC_PEER BIT(1)
@@ -337,4 +340,5 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb);
int rsi_band_check(struct rsi_common *common);
int rsi_send_rx_filter_frame(struct rsi_common *common, u16 rx_filter_word);
int rsi_send_radio_params_update(struct rsi_common *common);
+int rsi_set_antenna(struct rsi_common *common, u8 antenna);
#endif
--
2.4.11
^ permalink raw reply related
* [PATCH 3/5] rsi: Added support for configuring tx power
From: Prameela Rani Garnepudi @ 2016-11-14 12:17 UTC (permalink / raw)
To: linux-wireless
Cc: kvalo, johannes.berg, hofrat, xypron.glpk, prameela.garnepudi,
Prameela Rani Garnepudi
TX power can be configured from iwconfig, iw or from mac80211 when
regulatory changes are done. Hence support for configuring tx power
to device is added. This can be done by sending RADIO_PARAMS_UPDATE
command frame to device with upated tx power value.
Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 37 +++++++++++++++
drivers/net/wireless/rsi/rsi_91x_mgmt.c | 38 +++++++++++++++
drivers/net/wireless/rsi/rsi_main.h | 2 +
drivers/net/wireless/rsi/rsi_mgmt.h | 72 ++++++++++++++++++-----------
4 files changed, 123 insertions(+), 26 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index fa9498d..ba21608 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -397,6 +397,37 @@ static int rsi_channel_change(struct ieee80211_hw *hw)
}
/**
+ * rsi_config_power() - This function configures tx power in device
+ * @hw: Pointer to the ieee80211_hw structure.
+ *
+ * Return: 0 on success, negative error code on failure.
+ */
+static int rsi_config_power(struct ieee80211_hw *hw)
+{
+ struct rsi_hw *adapter = hw->priv;
+ struct rsi_common *common = adapter->priv;
+ struct ieee80211_conf *conf = &hw->conf;
+ int status;
+
+ if (adapter->sc_nvifs <= 0) {
+ rsi_dbg(ERR_ZONE, "%s: No virtual interface found\n", __func__);
+ return -EINVAL;
+ }
+
+ rsi_dbg(INFO_ZONE,
+ "%s: Set tx power: %d dBM\n", __func__, conf->power_level);
+
+ if (conf->power_level == common->tx_power)
+ return 0;
+
+ common->tx_power = conf->power_level;
+
+ status = rsi_send_radio_params_update(common);
+
+ return status;
+}
+
+/**
* rsi_mac80211_config() - This function is a handler for configuration
* requests. The stack calls this function to
* change hardware configuration, e.g., channel.
@@ -417,6 +448,12 @@ static int rsi_mac80211_config(struct ieee80211_hw *hw,
if (changed & IEEE80211_CONF_CHANGE_CHANNEL)
status = rsi_channel_change(hw);
+ /* tx power */
+ if (changed & IEEE80211_CONF_CHANGE_POWER) {
+ rsi_dbg(INFO_ZONE, "%s: Configuring Power\n", __func__);
+ status = rsi_config_power(hw);
+ }
+
mutex_unlock(&common->mutex);
return status;
diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index ae4a814..2e8e5dc 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -964,6 +964,44 @@ int rsi_set_channel(struct rsi_common *common, u16 channel)
}
/**
+ * rsi_send_radio_params_update() - This function sends the radio
+ * parameters update to device
+ * @common: Pointer to the driver private structure.
+ * @channel: Channel value to be set.
+ *
+ * Return: 0 on success, corresponding error code on failure.
+ */
+int rsi_send_radio_params_update(struct rsi_common *common)
+{
+ struct rsi_mac_frame *mgmt_frame;
+ struct sk_buff *skb = NULL;
+
+ rsi_dbg(MGMT_TX_ZONE,
+ "%s: Sending Radio Params update frame\n", __func__);
+
+ skb = dev_alloc_skb(FRAME_DESC_SZ);
+ if (!skb) {
+ rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
+ __func__);
+ return -ENOMEM;
+ }
+
+ memset(skb->data, 0, FRAME_DESC_SZ);
+ mgmt_frame = (struct rsi_mac_frame *)skb->data;
+
+ mgmt_frame->desc_word[0] = cpu_to_le16(RSI_WIFI_MGMT_Q << 12);
+ mgmt_frame->desc_word[1] = cpu_to_le16(RADIO_PARAMS_UPDATE);
+ mgmt_frame->desc_word[3] = cpu_to_le16(BIT(0));
+
+ mgmt_frame->desc_word[3] |= cpu_to_le16(common->tx_power << 8);
+
+ skb_put(skb, FRAME_DESC_SZ);
+
+ return rsi_send_internal_mgmt_frame(common, skb);
+}
+
+
+/**
* rsi_compare() - This function is used to compare two integers
* @a: pointer to the first integer
* @b: pointer to the second integer
diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h
index dcd0957..3938f13 100644
--- a/drivers/net/wireless/rsi/rsi_main.h
+++ b/drivers/net/wireless/rsi/rsi_main.h
@@ -204,6 +204,8 @@ struct rsi_common {
struct cqm_info cqm_info;
bool hw_data_qs_blocked;
+
+ int tx_power;
};
struct rsi_hw {
diff --git a/drivers/net/wireless/rsi/rsi_mgmt.h b/drivers/net/wireless/rsi/rsi_mgmt.h
index 40e8f8e..6547ae7 100644
--- a/drivers/net/wireless/rsi/rsi_mgmt.h
+++ b/drivers/net/wireless/rsi/rsi_mgmt.h
@@ -169,32 +169,51 @@ enum sta_notify_events {
/* Send Frames Types */
enum cmd_frame_type {
- TX_DOT11_MGMT,
- RESET_MAC_REQ,
- RADIO_CAPABILITIES,
- BB_PROG_VALUES_REQUEST,
- RF_PROG_VALUES_REQUEST,
- WAKEUP_SLEEP_REQUEST,
- SCAN_REQUEST,
- TSF_UPDATE,
- PEER_NOTIFY,
- BLOCK_HW_QUEUE,
- SET_KEY_REQ,
- AUTO_RATE_IND,
- BOOTUP_PARAMS_REQUEST,
- VAP_CAPABILITIES,
- EEPROM_READ_TYPE ,
- EEPROM_WRITE,
- GPIO_PIN_CONFIG ,
- SET_RX_FILTER,
- AMPDU_IND,
- STATS_REQUEST_FRAME,
- BB_BUF_PROG_VALUES_REQ,
- BBP_PROG_IN_TA,
- BG_SCAN_PARAMS,
- BG_SCAN_PROBE_REQ,
- CW_MODE_REQ,
- PER_CMD_PKT
+ TX_DOT11_MGMT = 0,
+ RESET_MAC_REQ, /* 0x1 */
+ RADIO_CAPABILITIES, /* 0x2 */
+ BB_PROG_VALUES_REQUEST, /* 0x3 */
+ RF_PROG_VALUES_REQUEST, /* 0x4 */
+ WAKEUP_SLEEP_REQUEST, /* 0x5 */
+ SCAN_REQUEST, /* 0x6 */
+ TSF_UPDATE, /* 0x7 */
+ PEER_NOTIFY, /* 0x8 */
+ BLOCK_HW_QUEUE, /* 0x9 */
+ SET_KEY_REQ, /* 0xA */
+ AUTO_RATE_IND, /* 0xB */
+ BOOTUP_PARAMS_REQUEST, /* 0xC */
+ VAP_CAPABILITIES, /* 0xD */
+ EEPROM_READ_TYPE, /* 0xE */
+ EEPROM_WRITE, /* 0xF */
+ GPIO_PIN_CONFIG, /* 0x10 */
+ SET_RX_FILTER, /* 0x11 */
+ AMPDU_IND, /* 0x12 */
+ STATS_REQUEST, /* 0x13 */
+ BB_BUF_PROG_VALUES_REQ, /* 0x14 */
+ BBP_PROG_IN_TA, /* 0x15 */
+ BG_SCAN_PARAMS, /* 0x16 */
+ BG_SCAN_PROBE_REQ, /* 0x17 */
+ CW_MODE_REQ, /* 0x18 */
+ PER_CMD_PKT, /* 0x19 */
+ DEV_SLEEP_REQUEST, /* 0x1A */
+ DEV_WAKEUP_CNF, /* 0x1B */
+ RF_LOOPBACK_REQ, /* 0x1C */
+ RF_LPBK_M3, /* 0x1D */
+ RF_RESET_FRAME, /* 0x1E */
+ LMAC_REG_OPS, /* 0x1F */
+ ANT_SEL_FRAME, /* 0x20 */
+ CONFIRM, /* 0x21 */
+ WLAN_DE_REGISTER, /* 0x22 */
+ DEBUG_FRAME, /* 0x23 */
+ HW_BMISS_HANDLE, /* 0x24 */
+ MULTICAST_ENABLE, /* 0x25 */
+ TX_MISC_IND, /* 0x26 */
+ VAP_DYNAMIC_UPDATE, /* 0x27 */
+ COMMON_DEV_CONFIG, /* 0x28 */
+ RADIO_PARAMS_UPDATE, /* 0x29 */
+ RADAR_REQUEST, /* 0x2A */
+ WOWLAN_CONFIG_PARAMS, /* 2B */
+ IAP_CONFIG, /* 0x2C */
};
struct rsi_mac_frame {
@@ -317,4 +336,5 @@ int rsi_send_mgmt_pkt(struct rsi_common *common, struct sk_buff *skb);
int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb);
int rsi_band_check(struct rsi_common *common);
int rsi_send_rx_filter_frame(struct rsi_common *common, u16 rx_filter_word);
+int rsi_send_radio_params_update(struct rsi_common *common);
#endif
--
2.4.11
^ permalink raw reply related
* [PATCH 1/5] rsi: Device configuration bootup parameters updated
From: Prameela Rani Garnepudi @ 2016-11-14 12:15 UTC (permalink / raw)
To: linux-wireless
Cc: kvalo, johannes.berg, hofrat, xypron.glpk, prameela.garnepudi,
Prameela Rani Garnepudi
Switch clock info values are changed in the firmware for both 20MHZ
and 40MHZ modes. Hence these values which are configured through boot
parameters request frame are updated. Also three other power save
related parameters are added to boot up parameters.
Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
---
drivers/net/wireless/rsi/rsi_91x_mgmt.c | 30 +++++++++++++++++-------
drivers/net/wireless/rsi/rsi_boot_params.h | 37 +++++++++++++++++++++++++++++-
2 files changed, 58 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index 35c14cc..8db377b 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -18,6 +18,7 @@
#include "rsi_mgmt.h"
#include "rsi_common.h"
+/* Bootup Parameters for 20MHz */
static struct bootup_params boot_params_20 = {
.magic_number = cpu_to_le16(0x5aa5),
.crystal_good_time = 0x0,
@@ -28,6 +29,7 @@ static struct bootup_params boot_params_20 = {
.rtls_timestamp_en = 0x0,
.host_spi_intr_cfg = 0x0,
.device_clk_info = {{
+ /* WLAN params */
.pll_config_g = {
.tapll_info_g = {
.pll_reg_1 = cpu_to_le16((TA_PLL_N_VAL_20 << 8)|
@@ -45,12 +47,13 @@ static struct bootup_params boot_params_20 = {
}
},
.switch_clk_g = {
- .switch_clk_info = cpu_to_le16(BIT(3)),
- .bbp_lmac_clk_reg_val = cpu_to_le16(0x121),
- .umac_clock_reg_config = 0x0,
- .qspi_uart_clock_reg_config = 0x0
+ .switch_clk_info = cpu_to_le16(0xB),
+ .bbp_lmac_clk_reg_val = cpu_to_le16(0x111),
+ .umac_clock_reg_config = cpu_to_le16(0x48),
+ .qspi_uart_clock_reg_config = cpu_to_le16(0x1211)
}
},
+ /* Bluetooth params */
{
.pll_config_g = {
.tapll_info_g = {
@@ -75,6 +78,7 @@ static struct bootup_params boot_params_20 = {
.qspi_uart_clock_reg_config = 0x0
}
},
+ /* Zigbee params */
{
.pll_config_g = {
.tapll_info_g = {
@@ -99,6 +103,7 @@ static struct bootup_params boot_params_20 = {
.qspi_uart_clock_reg_config = 0x0
}
} },
+ /* ULP Params */
.buckboost_wakeup_cnt = 0x0,
.pmu_wakeup_wait = 0x0,
.shutdown_wait_time = 0x0,
@@ -106,9 +111,13 @@ static struct bootup_params boot_params_20 = {
.wdt_prog_value = 0x0,
.wdt_soc_rst_delay = 0x0,
.dcdc_operation_mode = 0x0,
- .soc_reset_wait_cnt = 0x0
+ .soc_reset_wait_cnt = 0x0,
+ .waiting_time_at_fresh_sleep = 0x0,
+ .max_threshold_to_avoid_sleep = 0x0,
+ .beacon_resedue_alg_en = 0,
};
+/* Bootup parameters for 40MHz */
static struct bootup_params boot_params_40 = {
.magic_number = cpu_to_le16(0x5aa5),
.crystal_good_time = 0x0,
@@ -136,12 +145,13 @@ static struct bootup_params boot_params_40 = {
}
},
.switch_clk_g = {
- .switch_clk_info = cpu_to_le16(0x09),
+ .switch_clk_info = cpu_to_le16(0xB),
.bbp_lmac_clk_reg_val = cpu_to_le16(0x1121),
.umac_clock_reg_config = cpu_to_le16(0x48),
- .qspi_uart_clock_reg_config = 0x0
+ .qspi_uart_clock_reg_config = cpu_to_le16(0x1211)
}
},
+ /* Bluetooth Params */
{
.pll_config_g = {
.tapll_info_g = {
@@ -190,6 +200,7 @@ static struct bootup_params boot_params_40 = {
.qspi_uart_clock_reg_config = 0x0
}
} },
+ /* ULP Params */
.buckboost_wakeup_cnt = 0x0,
.pmu_wakeup_wait = 0x0,
.shutdown_wait_time = 0x0,
@@ -197,7 +208,10 @@ static struct bootup_params boot_params_40 = {
.wdt_prog_value = 0x0,
.wdt_soc_rst_delay = 0x0,
.dcdc_operation_mode = 0x0,
- .soc_reset_wait_cnt = 0x0
+ .soc_reset_wait_cnt = 0x0,
+ .waiting_time_at_fresh_sleep = 0x0,
+ .max_threshold_to_avoid_sleep = 0x0,
+ .beacon_resedue_alg_en = 0,
};
static u16 mcs[] = {13, 26, 39, 52, 78, 104, 117, 130};
diff --git a/drivers/net/wireless/rsi/rsi_boot_params.h b/drivers/net/wireless/rsi/rsi_boot_params.h
index 5e2721f..0d77aeb 100644
--- a/drivers/net/wireless/rsi/rsi_boot_params.h
+++ b/drivers/net/wireless/rsi/rsi_boot_params.h
@@ -99,11 +99,43 @@ struct device_clk_info {
struct bootup_params {
__le16 magic_number;
+#define LOADED_TOKEN 0x5AA5 /* Bootup params are installed by host
+ * or OTP/FLASH (Bootloader)
+ */
+#define ROM_TOKEN 0x55AA /* Bootup params are taken from ROM
+ * itself in MCU mode.
+ */
__le16 crystal_good_time;
__le32 valid;
+#define CRYSTAL_GOOD_TIME BIT(0)
+#define BOOTUP_MODE_INFO BIT(1)
+#define DIGITAL_LOOP_BACK_PARAMS BIT(2)
+#define RTLS_TIMESTAMP_EN BIT(3)
+#define HOST_SPI_INTR_CFG BIT(4)
+#define WIFI_TAPLL_CONFIGS BIT(5)
+#define WIFI_PLL960_CONFIGS BIT(6)
+#define WIFI_AFEPLL_CONFIGS BIT(7)
+#define WIFI_SWITCH_CLK_CONFIGS BIT(8)
+#define BT_TAPLL_CONFIGS BIT(9)
+#define BT_PLL960_CONFIGS BIT(10)
+#define BT_AFEPLL_CONFIGS BIT(11)
+#define BT_SWITCH_CLK_CONFIGS BIT(12)
+#define ZB_TAPLL_CONFIGS BIT(13)
+#define ZB_PLL960_CONFIGS BIT(14)
+#define ZB_AFEPLL_CONFIGS BIT(15)
+#define ZB_SWITCH_CLK_CONFIGS BIT(16)
+#define BUCKBOOST_WAIT_INFO BIT(17)
+#define PMU_WAKEUP_SHUTDOWN_W BIT(18)
+#define WDT_PROG_VALUES BIT(19)
+#define WDT_RESET_DELAY_VALUE BIT(20)
+#define DCDC_OPERATION_MODE_VALID BIT(21)
+#define PMU_SLP_CLKOUT_SEL BIT(22)
+#define SOC_RESET_WAIT_CNT BIT(23)
__le32 reserved_for_valids;
__le16 bootup_mode_info;
- /* configuration used for digital loop back */
+#define BT_COEXIST BIT(0)
+#define BOOTUP_MODE (BIT(2) | BIT(1))
+#define CUR_DEV_MODE (bootup_params.bootup_mode_info >> 1)
__le16 digital_loop_back_params;
__le16 rtls_timestamp_en;
__le16 host_spi_intr_cfg;
@@ -122,5 +154,8 @@ struct bootup_params {
/* dcdc modes configs */
__le32 dcdc_operation_mode;
__le32 soc_reset_wait_cnt;
+ __le32 waiting_time_at_fresh_sleep;
+ __le32 max_threshold_to_avoid_sleep;
+ u8 beacon_resedue_alg_en;
} __packed;
#endif
--
2.4.11
^ permalink raw reply related
* Re: [PATCH v6 2/2] media: Add a driver for the ov5645 camera sensor.
From: Laurent Pinchart @ 2016-11-14 12:18 UTC (permalink / raw)
To: Mark Brown
Cc: Todor Tomov, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
galak, mchehab, hverkuil, geert, matrandg, sakari.ailus,
linux-media
In-Reply-To: <20161026115149.GD17252@sirena.org.uk>
Hi Mark,
On Wednesday 26 Oct 2016 12:51:49 Mark Brown wrote:
> On Wed, Oct 26, 2016 at 02:27:23PM +0300, Todor Tomov wrote:
> > And using Mark Brown's correct address...
>
> This is an *enormous* e-mail quoted to multiple levels with top posting
> and very little editing which makes it incredibly hard to find any
> relevant content.
>
> > >> I believe it should be an API guarantee, otherwise many drivers using
> > >> the bulk API would break. Mark, could you please comment on that ?
> > >
> > > Ok, let's wait for a response from Mark.
>
> Why would this be guaranteed by the API given that it's not documented
> and why would many drivers break? It's fairly rare for devices other
> than SoCs to have strict power on sequencing requirements as it is hard
> to achieve in practical systems.
I'm surprised, I've always considered the bulk regulator API as guaranteeing
sequencing, and have written quite a few drivers with that assumption. If
that's not correct then I'll have to switch them back to manual regulator
handling.
Is there a reason why the API shouldn't guarantee that regulators are powered
on in the order listed, and powered off in the reverse order ? Looking at the
implementation that's already the case for regulator_bulk_disable(), but
regulator_bulk_enable() uses async scheduling so doesn't guarantee ordering. I
wonder whether a synchronous version of regulator_bulk_enable() would be
useful.
--
Regards,
Laurent Pinchart
^ permalink raw reply
* [LTP] [RFC] [PATCH] doc: Remove doc/testcases/*
From: Jan Stancek @ 2016-11-14 12:17 UTC (permalink / raw)
To: ltp
In-Reply-To: <20161110094334.GA11676@rei.lan>
----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: ltp@lists.linux.it
> Sent: Thursday, 10 November, 2016 10:43:34 AM
> Subject: [LTP] [RFC] [PATCH] doc: Remove doc/testcases/*
>
> These files are not maintained anymore and does not seem to be parsed by
> any tool in the LTP tree. So unless somebody really needs these and is
> willing to maintain them I'm voting for removal.
>
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> ---
> doc/testcases/commands.txt | 170 -
> doc/testcases/kernel.txt | 7006
> --------------------------------
> doc/testcases/misc.txt | 123 -
> doc/testcases/network.txt | 570 ---
> doc/testcases/open_hpi_testsuite.txt | 5 -
> doc/testcases/open_posix_testsuite.txt | 5 -
> 6 files changed, 7879 deletions(-)
> delete mode 100644 doc/testcases/commands.txt
> delete mode 100644 doc/testcases/kernel.txt
> delete mode 100644 doc/testcases/misc.txt
> delete mode 100644 doc/testcases/network.txt
> delete mode 100644 doc/testcases/open_hpi_testsuite.txt
> delete mode 100644 doc/testcases/open_posix_testsuite.txt
>
No objections to removal. I suspect many of these descriptions
are repeated in testcases (which are more up to date).
Regards,
Jan
^ permalink raw reply
* [PATCH v2 10/10] ARM: dts: rockchip: add rockchip RK1108 Evaluation board
From: Andy Yan @ 2016-11-14 12:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1479124550-24037-1-git-send-email-andy.yan@rock-chips.com>
RK1108 EVB is designed by Rockchip for CVR field.
This patch add basic support for it, which can boot with
initramfs into shell.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
---
Changes in v2:
- move the board in the rockchip.txt to the block of Rockchip boards
Documentation/devicetree/bindings/arm/rockchip.txt | 5 +-
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/rk1108-evb.dts | 69 ++++++++++++++++++++++
3 files changed, 74 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/rk1108-evb.dts
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
index 10b92b5..e658b62 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
@@ -1,6 +1,5 @@
Rockchip platforms device tree bindings
---------------------------------------
-
- Kylin RK3036 board:
Required root node properties:
- compatible = "rockchip,kylin-rk3036", "rockchip,rk3036";
@@ -111,6 +110,10 @@ Rockchip platforms device tree bindings
Required root node properties:
- compatible = "rockchip,px5-evb", "rockchip,px5", "rockchip,rk3368";
+- Rockchip RK1108 Evaluation board
+ Required root node properties:
+ - compatible = "rockchip,rk1108-evb", "rockchip,rk1108";
+
- Rockchip RK3368 evb:
Required root node properties:
- compatible = "rockchip,rk3368-evb-act8846", "rockchip,rk3368";
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e49476a..249dca9 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -635,6 +635,7 @@ dtb-$(CONFIG_ARCH_REALVIEW) += \
arm-realview-pba8.dtb \
arm-realview-pbx-a9.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += \
+ rk1108-evb.dtb \
rk3036-evb.dtb \
rk3036-kylin.dtb \
rk3066a-bqcurie2.dtb \
diff --git a/arch/arm/boot/dts/rk1108-evb.dts b/arch/arm/boot/dts/rk1108-evb.dts
new file mode 100644
index 0000000..3956cff
--- /dev/null
+++ b/arch/arm/boot/dts/rk1108-evb.dts
@@ -0,0 +1,69 @@
+/*
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "rk1108.dtsi"
+
+/ {
+ model = "Rockchip RK1108 Evaluation board";
+ compatible = "rockchip,rk1108-evb", "rockchip,rk1108";
+
+ memory at 60000000 {
+ device_type = "memory";
+ reg = <0x60000000 0x08000000>;
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
--
2.7.4
^ permalink raw reply related
* [PATCH v2 10/10] ARM: dts: rockchip: add rockchip RK1108 Evaluation board
From: Andy Yan @ 2016-11-14 12:17 UTC (permalink / raw)
To: heiko
Cc: linux-rockchip, mark.rutland, linux-arm-kernel, devicetree, linux,
linux-kernel, Andy Yan
In-Reply-To: <1479124550-24037-1-git-send-email-andy.yan@rock-chips.com>
RK1108 EVB is designed by Rockchip for CVR field.
This patch add basic support for it, which can boot with
initramfs into shell.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
---
Changes in v2:
- move the board in the rockchip.txt to the block of Rockchip boards
Documentation/devicetree/bindings/arm/rockchip.txt | 5 +-
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/rk1108-evb.dts | 69 ++++++++++++++++++++++
3 files changed, 74 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/rk1108-evb.dts
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
index 10b92b5..e658b62 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
@@ -1,6 +1,5 @@
Rockchip platforms device tree bindings
---------------------------------------
-
- Kylin RK3036 board:
Required root node properties:
- compatible = "rockchip,kylin-rk3036", "rockchip,rk3036";
@@ -111,6 +110,10 @@ Rockchip platforms device tree bindings
Required root node properties:
- compatible = "rockchip,px5-evb", "rockchip,px5", "rockchip,rk3368";
+- Rockchip RK1108 Evaluation board
+ Required root node properties:
+ - compatible = "rockchip,rk1108-evb", "rockchip,rk1108";
+
- Rockchip RK3368 evb:
Required root node properties:
- compatible = "rockchip,rk3368-evb-act8846", "rockchip,rk3368";
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e49476a..249dca9 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -635,6 +635,7 @@ dtb-$(CONFIG_ARCH_REALVIEW) += \
arm-realview-pba8.dtb \
arm-realview-pbx-a9.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += \
+ rk1108-evb.dtb \
rk3036-evb.dtb \
rk3036-kylin.dtb \
rk3066a-bqcurie2.dtb \
diff --git a/arch/arm/boot/dts/rk1108-evb.dts b/arch/arm/boot/dts/rk1108-evb.dts
new file mode 100644
index 0000000..3956cff
--- /dev/null
+++ b/arch/arm/boot/dts/rk1108-evb.dts
@@ -0,0 +1,69 @@
+/*
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "rk1108.dtsi"
+
+/ {
+ model = "Rockchip RK1108 Evaluation board";
+ compatible = "rockchip,rk1108-evb", "rockchip,rk1108";
+
+ memory@60000000 {
+ device_type = "memory";
+ reg = <0x60000000 0x08000000>;
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
--
2.7.4
^ permalink raw reply related
* Re: powerpc/pseries: Use H_CLEAR_HPT to clear MMU hash table during kexec
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Anton Blanchard, benh, paulus, mahesh, srikar, hbathini; +Cc: linuxppc-dev
In-Reply-To: <1475318516-8447-1-git-send-email-anton@ozlabs.org>
On Sat, 2016-01-10 at 10:41:56 UTC, Anton Blanchard wrote:
> From: Anton Blanchard <anton@samba.org>
>
> An hcall was recently added that does exactly what we need
> during kexec - it clears the entire MMU hash table, ignoring any
> VRMA mappings.
>
> Try it and fall back to the old method if we get a failure.
>
> On a POWER8 box with 5TB of memory, this reduces the time it takes to
> kexec a new kernel from from 4 minutes to 1 minute.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/5246adec59458b5d325b8e1462ea9e
cheers
^ permalink raw reply
* Re: tools/testing/selftests/powerpc: Add Anton's null_syscall benchmark to the selftests
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Rui Teng, linuxppc-dev, linux-kselftest, linux-kernel
Cc: Michael Neuling, Anton Blanchard, Rui Teng, Shuah Khan, Cyril Bur
In-Reply-To: <20160927141016.6027-1-rui.teng@linux.vnet.ibm.com>
On Tue, 2016-27-09 at 14:10:16 UTC, Rui Teng wrote:
> From: Anton Blanchard <anton@au.ibm.com>
>
> Pull in a version of Anton's null_syscall benchmark:
> http://ozlabs.org/~anton/junkcode/null_syscall.c
> Into tools/testing/selftests/powerpc/benchmarks.
>
> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Anton Blanchard <anton@au.ibm.com>
> Signed-off-by: Rui Teng <rui.teng@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/d8db9bc55a316d97d0acdf6ccc9f43
cheers
^ permalink raw reply
* Re: Removed dependency on IDE_GD_ATA if ADB_PMU_LED_DISK is selected.
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Elimar Riesebieter, linuxppc-dev
In-Reply-To: <20160918110845.akvr46gdpuubo2q2@aragorn.home.lxtec.de>
On Sun, 2016-18-09 at 11:08:45 UTC, Elimar Riesebieter wrote:
> We can use the front led of powerbooks/ibooks as a disk activitiy imagination
> without the deprecated IDE_GD_ATA.
>
> Signed-off-by: Elimar Riesebieter <riesebie@lxtec.de>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/0e865a80c1358db9311c411c4763b9
cheers
^ permalink raw reply
* Re: [RESEND] tools-powerpc: Return false instead of -1
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Andrew Shadura, linuxppc-dev, linux-api, linux-kernel
Cc: Shuah Khan, Paul Mackerras, Cyril Bur
In-Reply-To: <20161109085504.10799-1-andrew.shadura@collabora.co.uk>
On Wed, 2016-09-11 at 08:55:04 UTC, Andrew Shadura wrote:
> From: Peter Senna Tschudin <peter.senna@gmail.com>
>
> Returning a negative value for a boolean function seem to have the
> undesired effect of returning true. require_paranoia_below() is a
> boolean function, but the variable used to store the return value is an
> integer, receiving -1 or 0. This patch convert rc to bool, replace -1
> by false, and 0 by true.
>
> This issue was found by the following Coccinelle semantic patch:
> <smpl>
> @@
> identifier f, ret;
> constant C;
> typedef bool;
> @@
> bool f (...){
> <+...
> ret = -C;
> ...
> * return ret;
> ...+>
> }
> </smpl>
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
> Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/0e27d27e0d6d92342797e0d37738c2
cheers
^ permalink raw reply
* Re: powerpc/64s: reduce exception alignment
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Nicholas Piggin, linuxppc-dev; +Cc: Anton Blanchard, Nicholas Piggin
In-Reply-To: <20161013034352.9410-1-npiggin@gmail.com>
On Thu, 2016-13-10 at 03:43:52 UTC, Nicholas Piggin wrote:
> Exception handlers are aligned to 128 bytes (L1 cache) on 64s, which is
> overkill. It can reduce the icache footprint of any individual exception
> path. However taken as a whole, the expansion in icache footprint seems
> likely to be counter-productive and cause more total misses.
>
> Create IFETCH_ALIGN_SHIFT/BYTES, which should give optimal ifetch
> alignment with much more reasonable alignment. This saves 1792 bytes
> from head_64.o text with an allmodconfig build.
>
> Other subarchitectures should define appropriate IFETCH_ALIGN_SHIFT
> values if this becomes more widely used.
>
> Cc: Anton Blanchard <anton@samba.org>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/f4329f2ecb149282fdfdd8830a936a
cheers
^ permalink raw reply
* Re: powerpc: Remove suspect CONFIG_PPC_BOOK3E #ifdefs in nohash/64/pgtable.h
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Rui Teng, linuxppc-dev, linux-kernel; +Cc: Rui Teng, paulus
In-Reply-To: <1472106670-3432-1-git-send-email-rui.teng@linux.vnet.ibm.com>
On Thu, 2016-25-08 at 06:31:10 UTC, Rui Teng wrote:
> There are three #ifdef CONFIG_PPC_BOOK3E sections in nohash/64/pgtable.h.
> And there should be no configurations possible which use nohash/64/pgtable.h
> but don't also enable CONFIG_PPC_BOOK3E.
>
> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Rui Teng <rui.teng@linux.vnet.ibm.com>
> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/fda0440d82d38e603cd713e997fdfe
cheers
^ permalink raw reply
* Re: powerpc: make _ASM_NOKPROBE_SYMBOL a noop when KPROBES not defined
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Nicholas Piggin, linuxppc-dev; +Cc: Nicholas Piggin
In-Reply-To: <20161013020714.5629-1-npiggin@gmail.com>
On Thu, 2016-13-10 at 02:07:14 UTC, Nicholas Piggin wrote:
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/c0a5149105ab5f76f7c5a8fc2eb3d7
cheers
^ permalink raw reply
* Re: [v2] powerpc: EX_TABLE macro for exception tables
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev; +Cc: npiggin
In-Reply-To: <1478151792-13500-1-git-send-email-mpe@ellerman.id.au>
On Thu, 2016-03-11 at 05:43:12 UTC, Michael Ellerman wrote:
> From: Nicholas Piggin <npiggin@gmail.com>
>
> This macro is taken from s390, and allows more flexibility in
> changing exception table format.
>
> mpe: Put it in ppc_asm.h and only define one version using stringinfy_in_c().
> Add some empty definitions and headers to keep the selftests happy.
> Add some missing .previouses in fsl_rio.c and tsi108_pci.c.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/24bfa6a9e0d4fe414dfc4ad06c93e1
cheers
^ permalink raw reply
* Re: [v2] powernv: Simplify searching for compatible device nodes
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Jack Miller, stewart, linuxppc-dev
In-Reply-To: <20160811003240.19748-1-jack@codezen.org>
On Thu, 2016-11-08 at 00:32:40 UTC, Jack Miller wrote:
> This condenses the opal node searching into a single function that finds
> all compatible nodes, instead of just searching the ibm,opal children,
> for ipmi, flash, and prd similar to how opal-i2c nodes are found.
>
> Signed-off-by: Jack Miller <jack@codezen.org>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/9e4f51bdaf880208869aa001ee94a4
cheers
^ permalink raw reply
* Re: [v2] powerpc/64: option to force run-at-load to test relocation
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Nicholas Piggin, linuxppc-dev; +Cc: Nicholas Piggin
In-Reply-To: <20161014073133.24548-1-npiggin@gmail.com>
On Fri, 2016-14-10 at 07:31:33 UTC, Nicholas Piggin wrote:
> This adds a config option that can help exercise the case when
> the kernel is not running at PAGE_OFFSET.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> Reviewed-by: Balbir Singh <bsingharora@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/70839d207792aa348f013c733e8853
cheers
^ permalink raw reply
* Re: i2c_powermac: shut up lockdep warning
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Denis Kirjanov, linuxppc-dev; +Cc: Denis Kirjanov
In-Reply-To: <1474457698-3855-1-git-send-email-kda@linux-powerpc.org>
On Wed, 2016-21-09 at 11:34:58 UTC, Denis Kirjanov wrote:
> That's unclear why lockdep shows the following warning but adding a
> lockdep class to struct pmac_i2c_bus solves it
>
> [ 20.507795] ======================================================
> [ 20.507796] [ INFO: possible circular locking dependency detected ]
> [ 20.507800] 4.8.0-rc7-00037-gd2ffb01 #21 Not tainted
> [ 20.507801] -------------------------------------------------------
> [ 20.507803] swapper/0/1 is trying to acquire lock:
> [ 20.507818] (&bus->mutex){+.+.+.}, at: [<c000000000052830>] .pmac_i2c_open+0x30/0x100
> [ 20.507819]
> [ 20.507819] but task is already holding lock:
> [ 20.507829] (&policy->rwsem){+.+.+.}, at: [<c00000000068adcc>] .cpufreq_online+0x1ac/0x9d0
> [ 20.507830]
> [ 20.507830] which lock already depends on the new lock.
> [ 20.507830]
> [ 20.507832]
> [ 20.507832] the existing dependency chain (in reverse order) is:
> [ 20.507837]
> [ 20.507837] -> #4 (&policy->rwsem){+.+.+.}:
> [ 20.507844] [<c00000000082385c>] .down_write+0x6c/0x110
> [ 20.507849] [<c00000000068adcc>] .cpufreq_online+0x1ac/0x9d0
> [ 20.507855] [<c0000000004d76d8>] .subsys_interface_register+0xb8/0x110
> [ 20.507860] [<c000000000689bb0>] .cpufreq_register_driver+0x1d0/0x250
> [ 20.507866] [<c000000000b4f8f4>] .g5_cpufreq_init+0x9cc/0xa28
> [ 20.507872] [<c00000000000a98c>] .do_one_initcall+0x5c/0x1d0
> [ 20.507878] [<c000000000b0f86c>] .kernel_init_freeable+0x1ac/0x28c
> [ 20.507883] [<c00000000000b3bc>] .kernel_init+0x1c/0x140
> [ 20.507887] [<c0000000000098f4>] .ret_from_kernel_thread+0x58/0x64
> [ 20.507894]
> [ 20.507894] -> #3 (subsys mutex#2){+.+.+.}:
> [ 20.507899] [<c000000000820448>] .mutex_lock_nested+0xa8/0x590
> [ 20.507903] [<c0000000004d7f24>] .bus_probe_device+0x44/0xe0
> [ 20.507907] [<c0000000004d5208>] .device_add+0x508/0x730
> [ 20.507911] [<c0000000004dd528>] .register_cpu+0x118/0x190
> [ 20.507916] [<c000000000b14450>] .topology_init+0x148/0x248
> [ 20.507921] [<c00000000000a98c>] .do_one_initcall+0x5c/0x1d0
> [ 20.507925] [<c000000000b0f86c>] .kernel_init_freeable+0x1ac/0x28c
> [ 20.507929] [<c00000000000b3bc>] .kernel_init+0x1c/0x140
> [ 20.507934] [<c0000000000098f4>] .ret_from_kernel_thread+0x58/0x64
> [ 20.507939]
> [ 20.507939] -> #2 (cpu_add_remove_lock){+.+.+.}:
> [ 20.507944] [<c000000000820448>] .mutex_lock_nested+0xa8/0x590
> [ 20.507950] [<c000000000087a9c>] .register_cpu_notifier+0x2c/0x70
> [ 20.507955] [<c000000000b267e0>] .spawn_ksoftirqd+0x18/0x4c
> [ 20.507959] [<c00000000000a98c>] .do_one_initcall+0x5c/0x1d0
> [ 20.507964] [<c000000000b0f770>] .kernel_init_freeable+0xb0/0x28c
> [ 20.507968] [<c00000000000b3bc>] .kernel_init+0x1c/0x140
> [ 20.507972] [<c0000000000098f4>] .ret_from_kernel_thread+0x58/0x64
> [ 20.507978]
> [ 20.507978] -> #1 (&host->mutex){+.+.+.}:
> [ 20.507982] [<c000000000820448>] .mutex_lock_nested+0xa8/0x590
> [ 20.507987] [<c0000000000527e8>] .kw_i2c_open+0x18/0x30
> [ 20.507991] [<c000000000052894>] .pmac_i2c_open+0x94/0x100
> [ 20.507995] [<c000000000b220a0>] .smp_core99_probe+0x260/0x410
> [ 20.507999] [<c000000000b185bc>] .smp_prepare_cpus+0x280/0x2ac
> [ 20.508003] [<c000000000b0f748>] .kernel_init_freeable+0x88/0x28c
> [ 20.508008] [<c00000000000b3bc>] .kernel_init+0x1c/0x140
> [ 20.508012] [<c0000000000098f4>] .ret_from_kernel_thread+0x58/0x64
> [ 20.508018]
> [ 20.508018] -> #0 (&bus->mutex){+.+.+.}:
> [ 20.508023] [<c0000000000ed5b4>] .lock_acquire+0x84/0x100
> [ 20.508027] [<c000000000820448>] .mutex_lock_nested+0xa8/0x590
> [ 20.508032] [<c000000000052830>] .pmac_i2c_open+0x30/0x100
> [ 20.508037] [<c000000000052e14>] .pmac_i2c_do_begin+0x34/0x120
> [ 20.508040] [<c000000000056bc0>] .pmf_call_one+0x50/0xd0
> [ 20.508045] [<c00000000068ff1c>] .g5_pfunc_switch_volt+0x2c/0xc0
> [ 20.508050] [<c00000000068fecc>] .g5_pfunc_switch_freq+0x1cc/0x1f0
> [ 20.508054] [<c00000000068fc2c>] .g5_cpufreq_target+0x2c/0x40
> [ 20.508058] [<c0000000006873ec>] .__cpufreq_driver_target+0x23c/0x840
> [ 20.508062] [<c00000000068c798>] .cpufreq_gov_performance_limits+0x18/0x30
> [ 20.508067] [<c00000000068915c>] .cpufreq_start_governor+0xac/0x100
> [ 20.508071] [<c00000000068a788>] .cpufreq_set_policy+0x208/0x260
> [ 20.508076] [<c00000000068abdc>] .cpufreq_init_policy+0x6c/0xb0
> [ 20.508081] [<c00000000068ae70>] .cpufreq_online+0x250/0x9d0
> [ 20.508085] [<c0000000004d76d8>] .subsys_interface_register+0xb8/0x110
> [ 20.508090] [<c000000000689bb0>] .cpufreq_register_driver+0x1d0/0x250
> [ 20.508094] [<c000000000b4f8f4>] .g5_cpufreq_init+0x9cc/0xa28
> [ 20.508099] [<c00000000000a98c>] .do_one_initcall+0x5c/0x1d0
> [ 20.508103] [<c000000000b0f86c>] .kernel_init_freeable+0x1ac/0x28c
> [ 20.508107] [<c00000000000b3bc>] .kernel_init+0x1c/0x140
> [ 20.508112] [<c0000000000098f4>] .ret_from_kernel_thread+0x58/0x64
> [ 20.508113]
> [ 20.508113] other info that might help us debug this:
> [ 20.508113]
> [ 20.508121] Chain exists of:
> [ 20.508121] &bus->mutex --> subsys mutex#2 --> &policy->rwsem
> [ 20.508121]
> [ 20.508123] Possible unsafe locking scenario:
> [ 20.508123]
> [ 20.508124] CPU0 CPU1
> [ 20.508125] ---- ----
> [ 20.508128] lock(&policy->rwsem);
> [ 20.508132] lock(subsys mutex#2);
> [ 20.508135] lock(&policy->rwsem);
> [ 20.508138] lock(&bus->mutex);
> [ 20.508139]
> [ 20.508139] *** DEADLOCK ***
> [ 20.508139]
> [ 20.508141] 3 locks held by swapper/0/1:
> [ 20.508150] #0: (cpu_hotplug.lock){++++++}, at: [<c000000000087838>] .get_online_cpus+0x48/0xc0
> [ 20.508159] #1: (subsys mutex#2){+.+.+.}, at: [<c0000000004d7670>] .subsys_interface_register+0x50/0x110
> [ 20.508168] #2: (&policy->rwsem){+.+.+.}, at: [<c00000000068adcc>] .cpufreq_online+0x1ac/0x9d0
> [ 20.508169]
> [ 20.508169] stack backtrace:
> [ 20.508173] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc7-00037-gd2ffb01 #21
> [ 20.508175] Call Trace:
> [ 20.508180] [c0000000790c2b90] [c00000000082cc70] .dump_stack+0xe0/0x14c (unreliable)
> [ 20.508184] [c0000000790c2c20] [c000000000828c88] .print_circular_bug+0x350/0x388
> [ 20.508188] [c0000000790c2cd0] [c0000000000ecb0c] .__lock_acquire+0x196c/0x1d30
> [ 20.508192] [c0000000790c2e50] [c0000000000ed5b4] .lock_acquire+0x84/0x100
> [ 20.508196] [c0000000790c2f20] [c000000000820448] .mutex_lock_nested+0xa8/0x590
> [ 20.508201] [c0000000790c3030] [c000000000052830] .pmac_i2c_open+0x30/0x100
> [ 20.508206] [c0000000790c30c0] [c000000000052e14] .pmac_i2c_do_begin+0x34/0x120
> [ 20.508209] [c0000000790c3150] [c000000000056bc0] .pmf_call_one+0x50/0xd0
> [ 20.508213] [c0000000790c31e0] [c00000000068ff1c] .g5_pfunc_switch_volt+0x2c/0xc0
> [ 20.508217] [c0000000790c3250] [c00000000068fecc] .g5_pfunc_switch_freq+0x1cc/0x1f0
> [ 20.508221] [c0000000790c3320] [c00000000068fc2c] .g5_cpufreq_target+0x2c/0x40
> [ 20.508226] [c0000000790c3390] [c0000000006873ec] .__cpufreq_driver_target+0x23c/0x840
> [ 20.508230] [c0000000790c3440] [c00000000068c798] .cpufreq_gov_performance_limits+0x18/0x30
> [ 20.508235] [c0000000790c34b0] [c00000000068915c] .cpufreq_start_governor+0xac/0x100
> [ 20.508239] [c0000000790c3530] [c00000000068a788] .cpufreq_set_policy+0x208/0x260
> [ 20.508244] [c0000000790c35d0] [c00000000068abdc] .cpufreq_init_policy+0x6c/0xb0
> [ 20.508249] [c0000000790c3940] [c00000000068ae70] .cpufreq_online+0x250/0x9d0
> [ 20.508253] [c0000000790c3a30] [c0000000004d76d8] .subsys_interface_register+0xb8/0x110
> [ 20.508258] [c0000000790c3ad0] [c000000000689bb0] .cpufreq_register_driver+0x1d0/0x250
> [ 20.508262] [c0000000790c3b60] [c000000000b4f8f4] .g5_cpufreq_init+0x9cc/0xa28
> [ 20.508267] [c0000000790c3c20] [c00000000000a98c] .do_one_initcall+0x5c/0x1d0
> [ 20.508271] [c0000000790c3d00] [c000000000b0f86c] .kernel_init_freeable+0x1ac/0x28c
> [ 20.508276] [c0000000790c3db0] [c00000000000b3bc] .kernel_init+0x1c/0x140
> [ 20.508280] [c0000000790c3e30] [c0000000000098f4] .ret_from_kernel_thread+0x58/0x64
>
> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/9e607f72748ddc5620aeeb8d1f32f3
cheers
^ permalink raw reply
* Re: powerpc/configs: Drop REISERFS from pseries & powernv
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev; +Cc: anton
In-Reply-To: <1478157487-1533-1-git-send-email-mpe@ellerman.id.au>
On Thu, 2016-03-11 at 07:18:07 UTC, Michael Ellerman wrote:
> No one uses reiserfs much these days, or is likely to in future. So drop
> it from pseries and powernv defconfigs to save time and space. It's
> still enabled in ppc64_defconfig so we get some build coverage.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/7a53ef5ebe80bc15f70d060dc45484
cheers
^ permalink raw reply
* Re: [v2] powerpc/hash64: Be more careful when generating tlbiel
From: Michael Ellerman @ 2016-11-14 12:17 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev
In-Reply-To: <1476856405-4811-1-git-send-email-mpe@ellerman.id.au>
On Wed, 2016-19-10 at 05:53:25 UTC, Michael Ellerman wrote:
> From: Balbir Singh <bsingharora@gmail.com>
>
> In ISA v2.05, the tlbiel instruction takes two arguments, RB and L:
>
> tlbiel RB,L
>
> +---------+---------+----+---------+---------+---------+----+
> | 31 | / | L | / | RB | 274 | / |
> | 31 - 26 | 25 - 22 | 21 | 20 - 16 | 15 - 11 | 10 - 1 | 0 |
> +---------+---------+----+---------+---------+---------+----+
>
> In ISA v2.06 tlbiel takes only one argument, RB:
>
> tlbiel RB
>
> +---------+---------+---------+---------+---------+----+
> | 31 | / | / | RB | 274 | / |
> | 31 - 26 | 25 - 21 | 20 - 16 | 15 - 11 | 10 - 1 | 0 |
> +---------+---------+---------+---------+---------+----+
>
> And in ISA v3.00 tlbiel takes five arguments:
>
> tlbiel RB,RS,RIC,PRS,R
>
> +---------+---------+----+---------+----+----+---------+---------+----+
> | 31 | RS | / | RIC |PRS | R | RB | 274 | / |
> | 31 - 26 | 25 - 21 | 20 | 19 - 18 | 17 | 16 | 15 - 11 | 10 - 1 | 0 |
> +---------+---------+----+---------+----+----+---------+---------+----+
>
> However the assembler also accepts "tlbiel RB", and generates
> "tlbiel RB,r0,0,0,0".
>
> As you can see above the L field from the v2.05 encoding overlaps with the
> reserved field of the v2.06 encoding, and the low bit of the RS field of the
> v3.00 encoding.
>
> Currently in __tlbiel() we generate two tlbiel instructions manually using hex
> constants. In the first case, for MMU_PAGE_4K, we generate "tlbiel RB,0", which
> is safe in all cases, because the L bit is zero.
>
> However in the default case we generate "tlbiel RB,1", therefore setting bit 21
> to 1.
>
> This is not an actual bug on v2.06 processors, because the CPU ignores the value
> of the reserved field. However software is supposed to encode the reserved
> fields as zero to enable forward compatibility.
>
> On v3.00 processors setting bit 21 to 1 and no other bits of RS, means we are
> using r1 for the value of RS.
>
> Although it's not obvious, the code sets the IS field (bits 10-11) to 0 (by
> omission), and L=1, in the va value, which is passed as RB. We also pass R=0 in
> the instruction.
>
> The combination of IS=0, L=1 and R=0 means the value of RS is not used, so even
> on ISA v3.00 there is no actual bug.
>
> We should still fix it, as setting a reserved bit on v2.06 is naughty, and we
> are only avoiding a bug on v3.00 by accident rather than design. Use
> ASM_FTR_IFSET() to generate the single argument form on ISA v2.06 and later, and
> the two argument form on pre v2.06.
>
> Although there may be very old toolchains which don't understand tlbiel, we have
> other code in the tree which has been using tlbiel for over five years, and no
> one has reported any build failures, so just let the assembler generate the
> instructions.
>
> Signed-off-by: Balbir Singh <bsingharora@gmail.com>
> [mpe: Rewrite change log, use IFSET instead of IFCLR]
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/f923efbcfdbaa4391874eeda676b08
cheers
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.