forked from Minki/linux
Merge remote-tracking branch 'net-next/master' into mac80211-next
Resolve the merge conflict between Felix's/my and Toke's patches coming into the tree through net and mac80211-next respectively. Most of Felix's changes go away due to Toke's new infrastructure work, my patch changes to "goto begin" (the label wasn't there before) instead of returning NULL so flow control towards drivers is preserved better. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
commit
1e1430d528
1
.mailmap
1
.mailmap
@ -69,6 +69,7 @@ James Bottomley <jejb@mulgrave.(none)>
|
||||
James Bottomley <jejb@titanic.il.steeleye.com>
|
||||
James E Wilson <wilson@specifix.com>
|
||||
James Ketrenos <jketreno@io.(none)>
|
||||
Javi Merino <javi.merino@kernel.org> <javi.merino@arm.com>
|
||||
<javier@osg.samsung.com> <javier.martinez@collabora.co.uk>
|
||||
Jean Tourrilhes <jt@hpl.hp.com>
|
||||
Jeff Garzik <jgarzik@pretzel.yyz.us>
|
||||
|
@ -13,6 +13,7 @@ Required properties:
|
||||
- touchscreen-size-y : See touchscreen.txt
|
||||
|
||||
Optional properties:
|
||||
- firmware-name : File basename (string) for board specific firmware
|
||||
- touchscreen-inverted-x : See touchscreen.txt
|
||||
- touchscreen-inverted-y : See touchscreen.txt
|
||||
- touchscreen-swapped-x-y : See touchscreen.txt
|
||||
|
@ -10,7 +10,7 @@ Required properties:
|
||||
subsystem (mmcss) inside the FlashSS (available in STiH407 SoC
|
||||
family).
|
||||
|
||||
- clock-names: Should be "mmc".
|
||||
- clock-names: Should be "mmc" and "icn". (NB: The latter is not compulsory)
|
||||
See: Documentation/devicetree/bindings/resource-names.txt
|
||||
- clocks: Phandle to the clock.
|
||||
See: Documentation/devicetree/bindings/clock/clock-bindings.txt
|
||||
|
@ -11,8 +11,8 @@ The following properties are common to the Ethernet controllers:
|
||||
the maximum frame size (there's contradiction in ePAPR).
|
||||
- phy-mode: string, operation mode of the PHY interface; supported values are
|
||||
"mii", "gmii", "sgmii", "qsgmii", "tbi", "rev-mii", "rmii", "rgmii", "rgmii-id",
|
||||
"rgmii-rxid", "rgmii-txid", "rtbi", "smii", "xgmii"; this is now a de-facto
|
||||
standard property;
|
||||
"rgmii-rxid", "rgmii-txid", "rtbi", "smii", "xgmii", "trgmii"; this is now a
|
||||
de-facto standard property;
|
||||
- phy-connection-type: the same as "phy-mode" property but described in ePAPR;
|
||||
- phy-handle: phandle, specifies a reference to a node representing a PHY
|
||||
device; this property is described in ePAPR and so preferred;
|
||||
|
@ -24,14 +24,17 @@ Required properties:
|
||||
Optional properties:
|
||||
- interrupt-parent: Should be the phandle for the interrupt controller
|
||||
that services interrupts for this device
|
||||
|
||||
- mediatek,hwlro: the capability if the hardware supports LRO functions
|
||||
|
||||
* Ethernet MAC node
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "mediatek,eth-mac"
|
||||
- reg: The number of the MAC
|
||||
- phy-handle: see ethernet.txt file in the same directory.
|
||||
- phy-handle: see ethernet.txt file in the same directory and
|
||||
the phy-mode "trgmii" required being provided when reg
|
||||
is equal to 0 and the MAC uses fixed-link to connect
|
||||
with internal switch such as MT7530.
|
||||
|
||||
Example:
|
||||
|
||||
@ -51,6 +54,7 @@ eth: ethernet@1b100000 {
|
||||
reset-names = "eth";
|
||||
mediatek,ethsys = <ðsys>;
|
||||
mediatek,pctl = <&syscfg_pctl_a>;
|
||||
mediatek,hwlro;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
58
Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
Normal file
58
Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt
Normal file
@ -0,0 +1,58 @@
|
||||
* Microsemi - vsc8531 Giga bit ethernet phy
|
||||
|
||||
Required properties:
|
||||
- compatible : Should contain phy id as "ethernet-phy-idAAAA.BBBB"
|
||||
The PHY device uses the binding described in
|
||||
Documentation/devicetree/bindings/net/phy.txt
|
||||
|
||||
Optional properties:
|
||||
- vsc8531,vddmac : The vddmac in mV.
|
||||
- vsc8531,edge-slowdown : % the edge should be slowed down relative to
|
||||
the fastest possible edge time. Native sign
|
||||
need not enter.
|
||||
Edge rate sets the drive strength of the MAC
|
||||
interface output signals. Changing the drive
|
||||
strength will affect the edge rate of the output
|
||||
signal. The goal of this setting is to help
|
||||
reduce electrical emission (EMI) by being able
|
||||
to reprogram drive strength and in effect slow
|
||||
down the edge rate if desired. Table 1 shows the
|
||||
impact to the edge rate per VDDMAC supply for each
|
||||
drive strength setting.
|
||||
Ref: Table:1 - Edge rate change below.
|
||||
|
||||
Note: see dt-bindings/net/mscc-phy-vsc8531.h for applicable values
|
||||
|
||||
Table: 1 - Edge rate change
|
||||
----------------------------------------------------------------|
|
||||
| Edge Rate Change (VDDMAC) |
|
||||
| |
|
||||
| 3300 mV 2500 mV 1800 mV 1500 mV |
|
||||
|---------------------------------------------------------------|
|
||||
| Default Deafult Default Default |
|
||||
| (Fastest) (recommended) (recommended) |
|
||||
|---------------------------------------------------------------|
|
||||
| -2% -3% -5% -6% |
|
||||
|---------------------------------------------------------------|
|
||||
| -4% -6% -9% -14% |
|
||||
|---------------------------------------------------------------|
|
||||
| -7% -10% -16% -21% |
|
||||
|(recommended) (recommended) |
|
||||
|---------------------------------------------------------------|
|
||||
| -10% -14% -23% -29% |
|
||||
|---------------------------------------------------------------|
|
||||
| -17% -23% -35% -42% |
|
||||
|---------------------------------------------------------------|
|
||||
| -29% -37% -52% -58% |
|
||||
|---------------------------------------------------------------|
|
||||
| -53% -63% -76% -77% |
|
||||
| (slowest) |
|
||||
|---------------------------------------------------------------|
|
||||
|
||||
Example:
|
||||
|
||||
vsc8531_0: ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-id0007.0570";
|
||||
vsc8531,vddmac = <3300>;
|
||||
vsc8531,edge-slowdown = <21>;
|
||||
};
|
@ -5,6 +5,8 @@ interface contains.
|
||||
|
||||
Required properties:
|
||||
- compatible: "renesas,gether-r8a7740" if the device is a part of R8A7740 SoC.
|
||||
"renesas,ether-r8a7743" if the device is a part of R8A7743 SoC.
|
||||
"renesas,ether-r8a7745" if the device is a part of R8A7745 SoC.
|
||||
"renesas,ether-r8a7778" if the device is a part of R8A7778 SoC.
|
||||
"renesas,ether-r8a7779" if the device is a part of R8A7779 SoC.
|
||||
"renesas,ether-r8a7790" if the device is a part of R8A7790 SoC.
|
||||
|
@ -144,7 +144,7 @@ logical address types are already defined will return with error ``EBUSY``.
|
||||
|
||||
- ``flags``
|
||||
|
||||
- Flags. No flags are defined yet, so set this to 0.
|
||||
- Flags. See :ref:`cec-log-addrs-flags` for a list of available flags.
|
||||
|
||||
- .. row 7
|
||||
|
||||
@ -201,6 +201,25 @@ logical address types are already defined will return with error ``EBUSY``.
|
||||
give the CEC framework more information about the device type, even
|
||||
though the framework won't use it directly in the CEC message.
|
||||
|
||||
.. _cec-log-addrs-flags:
|
||||
|
||||
.. flat-table:: Flags for struct cec_log_addrs
|
||||
:header-rows: 0
|
||||
:stub-columns: 0
|
||||
:widths: 3 1 4
|
||||
|
||||
|
||||
- .. _`CEC-LOG-ADDRS-FL-ALLOW-UNREG-FALLBACK`:
|
||||
|
||||
- ``CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK``
|
||||
|
||||
- 1
|
||||
|
||||
- By default if no logical address of the requested type can be claimed, then
|
||||
it will go back to the unconfigured state. If this flag is set, then it will
|
||||
fallback to the Unregistered logical address. Note that if the Unregistered
|
||||
logical address was explicitly requested, then this flag has no effect.
|
||||
|
||||
.. _cec-versions:
|
||||
|
||||
.. flat-table:: CEC Versions
|
||||
|
@ -64,7 +64,8 @@ it is guaranteed that the state did change in between the two events.
|
||||
|
||||
- ``phys_addr``
|
||||
|
||||
- The current physical address.
|
||||
- The current physical address. This is ``CEC_PHYS_ADDR_INVALID`` if no
|
||||
valid physical address is set.
|
||||
|
||||
- .. row 2
|
||||
|
||||
@ -72,7 +73,10 @@ it is guaranteed that the state did change in between the two events.
|
||||
|
||||
- ``log_addr_mask``
|
||||
|
||||
- The current set of claimed logical addresses.
|
||||
- The current set of claimed logical addresses. This is 0 if no logical
|
||||
addresses are claimed or if ``phys_addr`` is ``CEC_PHYS_ADDR_INVALID``.
|
||||
If bit 15 is set (``1 << CEC_LOG_ADDR_UNREGISTERED``) then this device
|
||||
has the unregistered logical address. In that case all other bits are 0.
|
||||
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@ The driver can be built into the kernel (CONFIG_IPVLAN=y) or as a module
|
||||
There are no module parameters for this driver and it can be configured
|
||||
using IProute2/ip utility.
|
||||
|
||||
ip link add link <master-dev> <slave-dev> type ipvlan mode { l2 | L3 }
|
||||
ip link add link <master-dev> <slave-dev> type ipvlan mode { l2 | l3 | l3s }
|
||||
|
||||
e.g. ip link add link ipvl0 eth0 type ipvlan mode l2
|
||||
|
||||
@ -48,6 +48,11 @@ master device for the L2 processing and routing from that instance will be
|
||||
used before packets are queued on the outbound device. In this mode the slaves
|
||||
will not receive nor can send multicast / broadcast traffic.
|
||||
|
||||
4.3 L3S mode:
|
||||
This is very similar to the L3 mode except that iptables (conn-tracking)
|
||||
works in this mode and hence it is L3-symmetric (L3s). This will have slightly less
|
||||
performance but that shouldn't matter since you are choosing this mode over plain-L3
|
||||
mode to make conn-tracking work.
|
||||
|
||||
5. What to choose (macvlan vs. ipvlan)?
|
||||
These two devices are very similar in many regards and the specific use
|
||||
|
@ -314,30 +314,29 @@ the kernel, with the device doing the FIB lookup and forwarding. The device
|
||||
does a longest prefix match (LPM) on FIB entries matching route prefix and
|
||||
forwards the packet to the matching FIB entry's nexthop(s) egress ports.
|
||||
|
||||
To program the device, the driver implements support for
|
||||
SWITCHDEV_OBJ_IPV[4|6]_FIB object using switchdev_port_obj_xxx ops.
|
||||
switchdev_port_obj_add is used for both adding a new FIB entry to the device,
|
||||
or modifying an existing entry on the device.
|
||||
To program the device, the driver has to register a FIB notifier handler
|
||||
using register_fib_notifier. The following events are available:
|
||||
FIB_EVENT_ENTRY_ADD: used for both adding a new FIB entry to the device,
|
||||
or modifying an existing entry on the device.
|
||||
FIB_EVENT_ENTRY_DEL: used for removing a FIB entry
|
||||
FIB_EVENT_RULE_ADD, FIB_EVENT_RULE_DEL: used to propagate FIB rule changes
|
||||
|
||||
XXX: Currently, only SWITCHDEV_OBJ_ID_IPV4_FIB objects are supported.
|
||||
FIB_EVENT_ENTRY_ADD and FIB_EVENT_ENTRY_DEL events pass:
|
||||
|
||||
SWITCHDEV_OBJ_ID_IPV4_FIB object passes:
|
||||
|
||||
struct switchdev_obj_ipv4_fib { /* IPV4_FIB */
|
||||
struct fib_entry_notifier_info {
|
||||
struct fib_notifier_info info; /* must be first */
|
||||
u32 dst;
|
||||
int dst_len;
|
||||
struct fib_info *fi;
|
||||
u8 tos;
|
||||
u8 type;
|
||||
u32 nlflags;
|
||||
u32 tb_id;
|
||||
} ipv4_fib;
|
||||
u32 nlflags;
|
||||
};
|
||||
|
||||
to add/modify/delete IPv4 dst/dest_len prefix on table tb_id. The *fi
|
||||
structure holds details on the route and route's nexthops. *dev is one of the
|
||||
port netdevs mentioned in the routes next hop list. If the output port netdevs
|
||||
referenced in the route's nexthop list don't all have the same switch ID, the
|
||||
driver is not called to add/modify/delete the FIB entry.
|
||||
port netdevs mentioned in the route's next hop list.
|
||||
|
||||
Routes offloaded to the device are labeled with "offload" in the ip route
|
||||
listing:
|
||||
@ -355,6 +354,8 @@ listing:
|
||||
12.0.0.4 via 11.0.0.9 dev sw1p2 proto zebra metric 20 offload
|
||||
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.15
|
||||
|
||||
The "offload" flag is set in case at least one device offloads the FIB entry.
|
||||
|
||||
XXX: add/mod/del IPv6 FIB API
|
||||
|
||||
Nexthop Resolution
|
||||
|
25
MAINTAINERS
25
MAINTAINERS
@ -1634,6 +1634,7 @@ N: rockchip
|
||||
ARM/SAMSUNG EXYNOS ARM ARCHITECTURES
|
||||
M: Kukjin Kim <kgene@kernel.org>
|
||||
M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||
R: Javier Martinez Canillas <javier@osg.samsung.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
@ -2509,7 +2510,7 @@ S: Supported
|
||||
F: kernel/bpf/
|
||||
|
||||
BROADCOM B44 10/100 ETHERNET DRIVER
|
||||
M: Gary Zambrano <zambrano@broadcom.com>
|
||||
M: Michael Chan <michael.chan@broadcom.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/broadcom/b44.*
|
||||
@ -5592,10 +5593,9 @@ F: Documentation/devicetree/bindings/scsi/hisilicon-sas.txt
|
||||
|
||||
HOST AP DRIVER
|
||||
M: Jouni Malinen <j@w1.fi>
|
||||
L: hostap@shmoo.com (subscribers-only)
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://hostap.epitest.fi/
|
||||
S: Maintained
|
||||
W: http://w1.fi/hostap-driver.html
|
||||
S: Obsolete
|
||||
F: drivers/net/wireless/intersil/hostap/
|
||||
|
||||
HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER
|
||||
@ -6111,7 +6111,7 @@ S: Supported
|
||||
F: drivers/cpufreq/intel_pstate.c
|
||||
|
||||
INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
|
||||
M: Maik Broemme <mbroemme@plusserver.de>
|
||||
M: Maik Broemme <mbroemme@libmpq.org>
|
||||
L: linux-fbdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/fb/intelfb.txt
|
||||
@ -8169,6 +8169,15 @@ S: Maintained
|
||||
W: https://fedorahosted.org/dropwatch/
|
||||
F: net/core/drop_monitor.c
|
||||
|
||||
NETWORKING [DSA]
|
||||
M: Andrew Lunn <andrew@lunn.ch>
|
||||
M: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||
M: Florian Fainelli <f.fainelli@gmail.com>
|
||||
S: Maintained
|
||||
F: net/dsa/
|
||||
F: include/net/dsa.h
|
||||
F: drivers/net/dsa/
|
||||
|
||||
NETWORKING [GENERAL]
|
||||
M: "David S. Miller" <davem@davemloft.net>
|
||||
L: netdev@vger.kernel.org
|
||||
@ -8744,7 +8753,7 @@ F: drivers/oprofile/
|
||||
F: include/linux/oprofile.h
|
||||
|
||||
ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
|
||||
M: Mark Fasheh <mfasheh@suse.com>
|
||||
M: Mark Fasheh <mfasheh@versity.com>
|
||||
M: Joel Becker <jlbec@evilplan.org>
|
||||
L: ocfs2-devel@oss.oracle.com (moderated for non-subscribers)
|
||||
W: http://ocfs2.wiki.kernel.org
|
||||
@ -11632,7 +11641,7 @@ F: Documentation/devicetree/bindings/thermal/
|
||||
THERMAL/CPU_COOLING
|
||||
M: Amit Daniel Kachhap <amit.kachhap@gmail.com>
|
||||
M: Viresh Kumar <viresh.kumar@linaro.org>
|
||||
M: Javi Merino <javi.merino@arm.com>
|
||||
M: Javi Merino <javi.merino@kernel.org>
|
||||
L: linux-pm@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/thermal/cpu-cooling-api.txt
|
||||
@ -12585,7 +12594,7 @@ F: include/linux/if_*vlan.h
|
||||
F: net/8021q/
|
||||
|
||||
VLYNQ BUS
|
||||
M: Florian Fainelli <florian@openwrt.org>
|
||||
M: Florian Fainelli <f.fainelli@gmail.com>
|
||||
L: openwrt-devel@lists.openwrt.org (subscribers-only)
|
||||
S: Maintained
|
||||
F: drivers/vlynq/vlynq.c
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 8
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc6
|
||||
EXTRAVERSION =
|
||||
NAME = Psychotic Stoned Sheep
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -371,14 +371,6 @@ __copy_tofrom_user_nocheck(void *to, const void *from, long len)
|
||||
return __cu_len;
|
||||
}
|
||||
|
||||
extern inline long
|
||||
__copy_tofrom_user(void *to, const void *from, long len, const void __user *validate)
|
||||
{
|
||||
if (__access_ok((unsigned long)validate, len, get_fs()))
|
||||
len = __copy_tofrom_user_nocheck(to, from, len);
|
||||
return len;
|
||||
}
|
||||
|
||||
#define __copy_to_user(to, from, n) \
|
||||
({ \
|
||||
__chk_user_ptr(to); \
|
||||
@ -393,17 +385,22 @@ __copy_tofrom_user(void *to, const void *from, long len, const void __user *vali
|
||||
#define __copy_to_user_inatomic __copy_to_user
|
||||
#define __copy_from_user_inatomic __copy_from_user
|
||||
|
||||
|
||||
extern inline long
|
||||
copy_to_user(void __user *to, const void *from, long n)
|
||||
{
|
||||
return __copy_tofrom_user((__force void *)to, from, n, to);
|
||||
if (likely(__access_ok((unsigned long)to, n, get_fs())))
|
||||
n = __copy_tofrom_user_nocheck((__force void *)to, from, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
extern inline long
|
||||
copy_from_user(void *to, const void __user *from, long n)
|
||||
{
|
||||
return __copy_tofrom_user(to, (__force void *)from, n, from);
|
||||
if (likely(__access_ok((unsigned long)from, n, get_fs())))
|
||||
n = __copy_tofrom_user_nocheck(to, (__force void *)from, n);
|
||||
else
|
||||
memset(to, 0, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
extern void __do_clear_user(void);
|
||||
|
@ -83,7 +83,10 @@
|
||||
"2: ;nop\n" \
|
||||
" .section .fixup, \"ax\"\n" \
|
||||
" .align 4\n" \
|
||||
"3: mov %0, %3\n" \
|
||||
"3: # return -EFAULT\n" \
|
||||
" mov %0, %3\n" \
|
||||
" # zero out dst ptr\n" \
|
||||
" mov %1, 0\n" \
|
||||
" j 2b\n" \
|
||||
" .previous\n" \
|
||||
" .section __ex_table, \"a\"\n" \
|
||||
@ -101,7 +104,11 @@
|
||||
"2: ;nop\n" \
|
||||
" .section .fixup, \"ax\"\n" \
|
||||
" .align 4\n" \
|
||||
"3: mov %0, %3\n" \
|
||||
"3: # return -EFAULT\n" \
|
||||
" mov %0, %3\n" \
|
||||
" # zero out dst ptr\n" \
|
||||
" mov %1, 0\n" \
|
||||
" mov %R1, 0\n" \
|
||||
" j 2b\n" \
|
||||
" .previous\n" \
|
||||
" .section __ex_table, \"a\"\n" \
|
||||
|
@ -779,7 +779,7 @@ __armv7_mmu_cache_on:
|
||||
orrne r0, r0, #1 @ MMU enabled
|
||||
movne r1, #0xfffffffd @ domain 0 = client
|
||||
bic r6, r6, #1 << 31 @ 32-bit translation system
|
||||
bic r6, r6, #3 << 0 @ use only ttbr0
|
||||
bic r6, r6, #(7 << 0) | (1 << 4) @ use only ttbr0
|
||||
mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer
|
||||
mcrne p15, 0, r1, c3, c0, 0 @ load domain access control
|
||||
mcrne p15, 0, r6, c2, c0, 2 @ load ttb control
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
/ {
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0 0x10000000>;
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <dt-bindings/clock/bcm2835.h>
|
||||
#include <dt-bindings/clock/bcm2835-aux.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include "skeleton.dtsi"
|
||||
|
||||
/* This include file covers the common peripherals and configuration between
|
||||
* bcm2835 and bcm2836 implementations, leaving the CPU configuration to
|
||||
@ -13,6 +12,8 @@
|
||||
compatible = "brcm,bcm2835";
|
||||
model = "BCM2835";
|
||||
interrupt-parent = <&intc>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
chosen {
|
||||
bootargs = "earlyprintk console=ttyAMA0";
|
||||
|
@ -550,8 +550,9 @@
|
||||
interrupt-names = "mmcirq";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_mmc0>;
|
||||
clock-names = "mmc";
|
||||
clocks = <&clk_s_c0_flexgen CLK_MMC_0>;
|
||||
clock-names = "mmc", "icn";
|
||||
clocks = <&clk_s_c0_flexgen CLK_MMC_0>,
|
||||
<&clk_s_c0_flexgen CLK_RX_ICN_HVA>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
};
|
||||
@ -565,8 +566,9 @@
|
||||
interrupt-names = "mmcirq";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_sd1>;
|
||||
clock-names = "mmc";
|
||||
clocks = <&clk_s_c0_flexgen CLK_MMC_1>;
|
||||
clock-names = "mmc", "icn";
|
||||
clocks = <&clk_s_c0_flexgen CLK_MMC_1>,
|
||||
<&clk_s_c0_flexgen CLK_RX_ICN_HVA>;
|
||||
resets = <&softreset STIH407_MMC1_SOFTRESET>;
|
||||
bus-width = <4>;
|
||||
};
|
||||
|
@ -41,7 +41,8 @@
|
||||
compatible = "st,st-ohci-300x";
|
||||
reg = <0x9a03c00 0x100>;
|
||||
interrupts = <GIC_SPI 180 IRQ_TYPE_NONE>;
|
||||
clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>;
|
||||
clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>,
|
||||
<&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>;
|
||||
resets = <&powerdown STIH407_USB2_PORT0_POWERDOWN>,
|
||||
<&softreset STIH407_USB2_PORT0_SOFTRESET>;
|
||||
reset-names = "power", "softreset";
|
||||
@ -57,7 +58,8 @@
|
||||
interrupts = <GIC_SPI 151 IRQ_TYPE_NONE>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usb0>;
|
||||
clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>;
|
||||
clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>,
|
||||
<&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>;
|
||||
resets = <&powerdown STIH407_USB2_PORT0_POWERDOWN>,
|
||||
<&softreset STIH407_USB2_PORT0_SOFTRESET>;
|
||||
reset-names = "power", "softreset";
|
||||
@ -71,7 +73,8 @@
|
||||
compatible = "st,st-ohci-300x";
|
||||
reg = <0x9a83c00 0x100>;
|
||||
interrupts = <GIC_SPI 181 IRQ_TYPE_NONE>;
|
||||
clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>;
|
||||
clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>,
|
||||
<&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>;
|
||||
resets = <&powerdown STIH407_USB2_PORT1_POWERDOWN>,
|
||||
<&softreset STIH407_USB2_PORT1_SOFTRESET>;
|
||||
reset-names = "power", "softreset";
|
||||
@ -87,7 +90,8 @@
|
||||
interrupts = <GIC_SPI 153 IRQ_TYPE_NONE>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usb1>;
|
||||
clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>;
|
||||
clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>,
|
||||
<&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>;
|
||||
resets = <&powerdown STIH407_USB2_PORT1_POWERDOWN>,
|
||||
<&softreset STIH407_USB2_PORT1_SOFTRESET>;
|
||||
reset-names = "power", "softreset";
|
||||
|
@ -140,7 +140,7 @@ static struct locomo_dev_info locomo_devices[] = {
|
||||
|
||||
static void locomo_handler(struct irq_desc *desc)
|
||||
{
|
||||
struct locomo *lchip = irq_desc_get_chip_data(desc);
|
||||
struct locomo *lchip = irq_desc_get_handler_data(desc);
|
||||
int req, i;
|
||||
|
||||
/* Acknowledge the parent IRQ */
|
||||
@ -200,8 +200,7 @@ static void locomo_setup_irq(struct locomo *lchip)
|
||||
* Install handler for IRQ_LOCOMO_HW.
|
||||
*/
|
||||
irq_set_irq_type(lchip->irq, IRQ_TYPE_EDGE_FALLING);
|
||||
irq_set_chip_data(lchip->irq, lchip);
|
||||
irq_set_chained_handler(lchip->irq, locomo_handler);
|
||||
irq_set_chained_handler_and_data(lchip->irq, locomo_handler, lchip);
|
||||
|
||||
/* Install handlers for IRQ_LOCOMO_* */
|
||||
for ( ; irq <= lchip->irq_base + 3; irq++) {
|
||||
|
@ -472,8 +472,8 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base)
|
||||
* specifies that S0ReadyInt and S1ReadyInt should be '1'.
|
||||
*/
|
||||
sa1111_writel(0, irqbase + SA1111_INTPOL0);
|
||||
sa1111_writel(SA1111_IRQMASK_HI(IRQ_S0_READY_NINT) |
|
||||
SA1111_IRQMASK_HI(IRQ_S1_READY_NINT),
|
||||
sa1111_writel(BIT(IRQ_S0_READY_NINT & 31) |
|
||||
BIT(IRQ_S1_READY_NINT & 31),
|
||||
irqbase + SA1111_INTPOL1);
|
||||
|
||||
/* clear all IRQs */
|
||||
@ -754,7 +754,7 @@ static int __sa1111_probe(struct device *me, struct resource *mem, int irq)
|
||||
if (sachip->irq != NO_IRQ) {
|
||||
ret = sa1111_setup_irq(sachip, pd->irq_base);
|
||||
if (ret)
|
||||
goto err_unmap;
|
||||
goto err_clk;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_SA1100
|
||||
@ -799,6 +799,8 @@ static int __sa1111_probe(struct device *me, struct resource *mem, int irq)
|
||||
|
||||
return 0;
|
||||
|
||||
err_clk:
|
||||
clk_disable(sachip->clk);
|
||||
err_unmap:
|
||||
iounmap(sachip->base);
|
||||
err_clk_unprep:
|
||||
@ -869,9 +871,9 @@ struct sa1111_save_data {
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
|
||||
static int sa1111_suspend_noirq(struct device *dev)
|
||||
{
|
||||
struct sa1111 *sachip = platform_get_drvdata(dev);
|
||||
struct sa1111 *sachip = dev_get_drvdata(dev);
|
||||
struct sa1111_save_data *save;
|
||||
unsigned long flags;
|
||||
unsigned int val;
|
||||
@ -934,9 +936,9 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
|
||||
* restored by their respective drivers, and must be called
|
||||
* via LDM after this function.
|
||||
*/
|
||||
static int sa1111_resume(struct platform_device *dev)
|
||||
static int sa1111_resume_noirq(struct device *dev)
|
||||
{
|
||||
struct sa1111 *sachip = platform_get_drvdata(dev);
|
||||
struct sa1111 *sachip = dev_get_drvdata(dev);
|
||||
struct sa1111_save_data *save;
|
||||
unsigned long flags, id;
|
||||
void __iomem *base;
|
||||
@ -952,7 +954,7 @@ static int sa1111_resume(struct platform_device *dev)
|
||||
id = sa1111_readl(sachip->base + SA1111_SKID);
|
||||
if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
|
||||
__sa1111_remove(sachip);
|
||||
platform_set_drvdata(dev, NULL);
|
||||
dev_set_drvdata(dev, NULL);
|
||||
kfree(save);
|
||||
return 0;
|
||||
}
|
||||
@ -1003,8 +1005,8 @@ static int sa1111_resume(struct platform_device *dev)
|
||||
}
|
||||
|
||||
#else
|
||||
#define sa1111_suspend NULL
|
||||
#define sa1111_resume NULL
|
||||
#define sa1111_suspend_noirq NULL
|
||||
#define sa1111_resume_noirq NULL
|
||||
#endif
|
||||
|
||||
static int sa1111_probe(struct platform_device *pdev)
|
||||
@ -1017,7 +1019,7 @@ static int sa1111_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
return -ENXIO;
|
||||
return irq;
|
||||
|
||||
return __sa1111_probe(&pdev->dev, mem, irq);
|
||||
}
|
||||
@ -1038,6 +1040,11 @@ static int sa1111_remove(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dev_pm_ops sa1111_pm_ops = {
|
||||
.suspend_noirq = sa1111_suspend_noirq,
|
||||
.resume_noirq = sa1111_resume_noirq,
|
||||
};
|
||||
|
||||
/*
|
||||
* Not sure if this should be on the system bus or not yet.
|
||||
* We really want some way to register a system device at
|
||||
@ -1050,10 +1057,9 @@ static int sa1111_remove(struct platform_device *pdev)
|
||||
static struct platform_driver sa1111_device_driver = {
|
||||
.probe = sa1111_probe,
|
||||
.remove = sa1111_remove,
|
||||
.suspend = sa1111_suspend,
|
||||
.resume = sa1111_resume,
|
||||
.driver = {
|
||||
.name = "sa1111",
|
||||
.pm = &sa1111_pm_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -161,6 +161,7 @@ CONFIG_USB_MON=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_KEYSTONE_USB_PHY=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
|
@ -781,7 +781,7 @@ CONFIG_MXS_DMA=y
|
||||
CONFIG_DMA_BCM2835=y
|
||||
CONFIG_DMA_OMAP=y
|
||||
CONFIG_QCOM_BAM_DMA=y
|
||||
CONFIG_XILINX_VDMA=y
|
||||
CONFIG_XILINX_DMA=y
|
||||
CONFIG_DMA_SUN6I=y
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_SENSORS_ISL29018=y
|
||||
|
@ -284,7 +284,7 @@ static int ctr_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
|
||||
err = blkcipher_walk_done(desc, &walk,
|
||||
walk.nbytes % AES_BLOCK_SIZE);
|
||||
}
|
||||
if (nbytes) {
|
||||
if (walk.nbytes % AES_BLOCK_SIZE) {
|
||||
u8 *tdst = walk.dst.virt.addr + blocks * AES_BLOCK_SIZE;
|
||||
u8 *tsrc = walk.src.virt.addr + blocks * AES_BLOCK_SIZE;
|
||||
u8 __aligned(8) tail[AES_BLOCK_SIZE];
|
||||
|
@ -111,7 +111,7 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr)
|
||||
/* The ARM override for dma_max_pfn() */
|
||||
static inline unsigned long dma_max_pfn(struct device *dev)
|
||||
{
|
||||
return PHYS_PFN_OFFSET + dma_to_pfn(dev, *dev->dma_mask);
|
||||
return dma_to_pfn(dev, *dev->dma_mask);
|
||||
}
|
||||
#define dma_max_pfn(dev) dma_max_pfn(dev)
|
||||
|
||||
|
@ -47,6 +47,7 @@
|
||||
#define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
|
||||
#define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE)
|
||||
#define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
|
||||
#define PMD_SECT_CACHE_MASK (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
|
||||
#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2))
|
||||
|
||||
/*
|
||||
|
@ -62,6 +62,7 @@
|
||||
#define PMD_SECT_WT (_AT(pmdval_t, 2) << 2) /* normal inner write-through */
|
||||
#define PMD_SECT_WB (_AT(pmdval_t, 3) << 2) /* normal inner write-back */
|
||||
#define PMD_SECT_WBWA (_AT(pmdval_t, 7) << 2) /* normal inner write-alloc */
|
||||
#define PMD_SECT_CACHE_MASK (_AT(pmdval_t, 7) << 2)
|
||||
|
||||
/*
|
||||
* + Level 3 descriptor (PTE)
|
||||
|
@ -88,6 +88,8 @@ void __init arm_dt_init_cpu_maps(void)
|
||||
return;
|
||||
|
||||
for_each_child_of_node(cpus, cpu) {
|
||||
const __be32 *cell;
|
||||
int prop_bytes;
|
||||
u32 hwid;
|
||||
|
||||
if (of_node_cmp(cpu->type, "cpu"))
|
||||
@ -99,7 +101,8 @@ void __init arm_dt_init_cpu_maps(void)
|
||||
* properties is considered invalid to build the
|
||||
* cpu_logical_map.
|
||||
*/
|
||||
if (of_property_read_u32(cpu, "reg", &hwid)) {
|
||||
cell = of_get_property(cpu, "reg", &prop_bytes);
|
||||
if (!cell || prop_bytes < sizeof(*cell)) {
|
||||
pr_debug(" * %s missing reg property\n",
|
||||
cpu->full_name);
|
||||
of_node_put(cpu);
|
||||
@ -107,10 +110,15 @@ void __init arm_dt_init_cpu_maps(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* 8 MSBs must be set to 0 in the DT since the reg property
|
||||
* Bits n:24 must be set to 0 in the DT since the reg property
|
||||
* defines the MPIDR[23:0].
|
||||
*/
|
||||
if (hwid & ~MPIDR_HWID_BITMASK) {
|
||||
do {
|
||||
hwid = be32_to_cpu(*cell++);
|
||||
prop_bytes -= sizeof(*cell);
|
||||
} while (!hwid && prop_bytes > 0);
|
||||
|
||||
if (prop_bytes || (hwid & ~MPIDR_HWID_BITMASK)) {
|
||||
of_node_put(cpu);
|
||||
return;
|
||||
}
|
||||
|
@ -158,8 +158,6 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
|
||||
{
|
||||
int i;
|
||||
|
||||
kvm_free_stage2_pgd(kvm);
|
||||
|
||||
for (i = 0; i < KVM_MAX_VCPUS; ++i) {
|
||||
if (kvm->vcpus[i]) {
|
||||
kvm_arch_vcpu_free(kvm->vcpus[i]);
|
||||
|
@ -1714,7 +1714,8 @@ int kvm_mmu_init(void)
|
||||
kern_hyp_va(PAGE_OFFSET), kern_hyp_va(~0UL));
|
||||
|
||||
if (hyp_idmap_start >= kern_hyp_va(PAGE_OFFSET) &&
|
||||
hyp_idmap_start < kern_hyp_va(~0UL)) {
|
||||
hyp_idmap_start < kern_hyp_va(~0UL) &&
|
||||
hyp_idmap_start != (unsigned long)__hyp_idmap_text_start) {
|
||||
/*
|
||||
* The idmap page is intersecting with the VA space,
|
||||
* it is not safe to continue further.
|
||||
@ -1893,6 +1894,7 @@ void kvm_arch_memslots_updated(struct kvm *kvm, struct kvm_memslots *slots)
|
||||
|
||||
void kvm_arch_flush_shadow_all(struct kvm *kvm)
|
||||
{
|
||||
kvm_free_stage2_pgd(kvm);
|
||||
}
|
||||
|
||||
void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
|
||||
|
@ -255,6 +255,12 @@ static int __init exynos_pmu_irq_init(struct device_node *node,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear the OF_POPULATED flag set in of_irq_init so that
|
||||
* later the Exynos PMU platform device won't be skipped.
|
||||
*/
|
||||
of_node_clear_flag(node, OF_POPULATED);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -137,6 +137,18 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
|
||||
// no D+ pullup; lubbock can't connect/disconnect in software
|
||||
};
|
||||
|
||||
static void lubbock_init_pcmcia(void)
|
||||
{
|
||||
struct clk *clk;
|
||||
|
||||
/* Add an alias for the SA1111 PCMCIA clock */
|
||||
clk = clk_get_sys("pxa2xx-pcmcia", NULL);
|
||||
if (!IS_ERR(clk)) {
|
||||
clkdev_create(clk, NULL, "1800");
|
||||
clk_put(clk);
|
||||
}
|
||||
}
|
||||
|
||||
static struct resource sa1111_resources[] = {
|
||||
[0] = {
|
||||
.start = 0x10000000,
|
||||
@ -467,6 +479,8 @@ static void __init lubbock_init(void)
|
||||
pxa_set_btuart_info(NULL);
|
||||
pxa_set_stuart_info(NULL);
|
||||
|
||||
lubbock_init_pcmcia();
|
||||
|
||||
clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL);
|
||||
pxa_set_udc_info(&udc_info);
|
||||
pxa_set_fb_info(NULL, &sharp_lm8v31);
|
||||
|
@ -41,40 +41,27 @@
|
||||
|
||||
#define REGULATOR_IRQ_MASK BIT(2) /* IRQ2, active low */
|
||||
|
||||
/* start of DA9210 System Control and Event Registers */
|
||||
#define DA9210_REG_MASK_A 0x54
|
||||
|
||||
static void __iomem *irqc;
|
||||
|
||||
static const u8 da9063_mask_regs[] = {
|
||||
DA9063_REG_IRQ_MASK_A,
|
||||
DA9063_REG_IRQ_MASK_B,
|
||||
DA9063_REG_IRQ_MASK_C,
|
||||
DA9063_REG_IRQ_MASK_D,
|
||||
/* first byte sets the memory pointer, following are consecutive reg values */
|
||||
static u8 da9063_irq_clr[] = { DA9063_REG_IRQ_MASK_A, 0xff, 0xff, 0xff, 0xff };
|
||||
static u8 da9210_irq_clr[] = { DA9210_REG_MASK_A, 0xff, 0xff };
|
||||
|
||||
static struct i2c_msg da9xxx_msgs[2] = {
|
||||
{
|
||||
.addr = 0x58,
|
||||
.len = ARRAY_SIZE(da9063_irq_clr),
|
||||
.buf = da9063_irq_clr,
|
||||
}, {
|
||||
.addr = 0x68,
|
||||
.len = ARRAY_SIZE(da9210_irq_clr),
|
||||
.buf = da9210_irq_clr,
|
||||
},
|
||||
};
|
||||
|
||||
/* DA9210 System Control and Event Registers */
|
||||
#define DA9210_REG_MASK_A 0x54
|
||||
#define DA9210_REG_MASK_B 0x55
|
||||
|
||||
static const u8 da9210_mask_regs[] = {
|
||||
DA9210_REG_MASK_A,
|
||||
DA9210_REG_MASK_B,
|
||||
};
|
||||
|
||||
static void da9xxx_mask_irqs(struct i2c_client *client, const u8 regs[],
|
||||
unsigned int nregs)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
dev_info(&client->dev, "Masking %s interrupt sources\n", client->name);
|
||||
|
||||
for (i = 0; i < nregs; i++) {
|
||||
int error = i2c_smbus_write_byte_data(client, regs[i], ~0);
|
||||
if (error) {
|
||||
dev_err(&client->dev, "i2c error %d\n", error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int regulator_quirk_notify(struct notifier_block *nb,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
@ -93,12 +80,15 @@ static int regulator_quirk_notify(struct notifier_block *nb,
|
||||
client = to_i2c_client(dev);
|
||||
dev_dbg(dev, "Detected %s\n", client->name);
|
||||
|
||||
if ((client->addr == 0x58 && !strcmp(client->name, "da9063")))
|
||||
da9xxx_mask_irqs(client, da9063_mask_regs,
|
||||
ARRAY_SIZE(da9063_mask_regs));
|
||||
else if (client->addr == 0x68 && !strcmp(client->name, "da9210"))
|
||||
da9xxx_mask_irqs(client, da9210_mask_regs,
|
||||
ARRAY_SIZE(da9210_mask_regs));
|
||||
if ((client->addr == 0x58 && !strcmp(client->name, "da9063")) ||
|
||||
(client->addr == 0x68 && !strcmp(client->name, "da9210"))) {
|
||||
int ret;
|
||||
|
||||
dev_info(&client->dev, "clearing da9063/da9210 interrupts\n");
|
||||
ret = i2c_transfer(client->adapter, da9xxx_msgs, ARRAY_SIZE(da9xxx_msgs));
|
||||
if (ret != ARRAY_SIZE(da9xxx_msgs))
|
||||
dev_err(&client->dev, "i2c error %d\n", ret);
|
||||
}
|
||||
|
||||
mon = ioread32(irqc + IRQC_MONITOR);
|
||||
if (mon & REGULATOR_IRQ_MASK)
|
||||
|
@ -137,7 +137,7 @@ void __init init_default_cache_policy(unsigned long pmd)
|
||||
|
||||
initial_pmd_value = pmd;
|
||||
|
||||
pmd &= PMD_SECT_TEX(1) | PMD_SECT_BUFFERABLE | PMD_SECT_CACHEABLE;
|
||||
pmd &= PMD_SECT_CACHE_MASK;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cache_policies); i++)
|
||||
if (cache_policies[i].pmd == pmd) {
|
||||
|
@ -170,9 +170,6 @@ static int xen_starting_cpu(unsigned int cpu)
|
||||
pr_info("Xen: initializing cpu%d\n", cpu);
|
||||
vcpup = per_cpu_ptr(xen_vcpu_info, cpu);
|
||||
|
||||
/* Direct vCPU id mapping for ARM guests. */
|
||||
per_cpu(xen_vcpu_id, cpu) = cpu;
|
||||
|
||||
info.mfn = virt_to_gfn(vcpup);
|
||||
info.offset = xen_offset_in_page(vcpup);
|
||||
|
||||
@ -330,6 +327,7 @@ static int __init xen_guest_init(void)
|
||||
{
|
||||
struct xen_add_to_physmap xatp;
|
||||
struct shared_info *shared_info_page = NULL;
|
||||
int cpu;
|
||||
|
||||
if (!xen_domain())
|
||||
return 0;
|
||||
@ -380,7 +378,8 @@ static int __init xen_guest_init(void)
|
||||
return -ENOMEM;
|
||||
|
||||
/* Direct vCPU id mapping for ARM guests. */
|
||||
per_cpu(xen_vcpu_id, 0) = 0;
|
||||
for_each_possible_cpu(cpu)
|
||||
per_cpu(xen_vcpu_id, cpu) = cpu;
|
||||
|
||||
xen_auto_xlat_grant_frames.count = gnttab_max_grant_frames();
|
||||
if (xen_xlate_map_ballooned_pages(&xen_auto_xlat_grant_frames.pfn,
|
||||
|
@ -255,10 +255,10 @@
|
||||
/* Local timer */
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <1 13 0xf01>,
|
||||
<1 14 0xf01>,
|
||||
<1 11 0xf01>,
|
||||
<1 10 0xf01>;
|
||||
interrupts = <1 13 0xf08>,
|
||||
<1 14 0xf08>,
|
||||
<1 11 0xf08>,
|
||||
<1 10 0xf08>;
|
||||
};
|
||||
|
||||
timer0: timer0@ffc03000 {
|
||||
|
@ -102,13 +102,13 @@
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <GIC_PPI 13
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>,
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 14
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>,
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 11
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>,
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 10
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_EDGE_RISING)>;
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
|
||||
};
|
||||
|
||||
xtal: xtal-clk {
|
||||
|
@ -110,10 +110,10 @@
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <1 0 0xff01>, /* Secure Phys IRQ */
|
||||
<1 13 0xff01>, /* Non-secure Phys IRQ */
|
||||
<1 14 0xff01>, /* Virt IRQ */
|
||||
<1 15 0xff01>; /* Hyp IRQ */
|
||||
interrupts = <1 0 0xff08>, /* Secure Phys IRQ */
|
||||
<1 13 0xff08>, /* Non-secure Phys IRQ */
|
||||
<1 14 0xff08>, /* Virt IRQ */
|
||||
<1 15 0xff08>; /* Hyp IRQ */
|
||||
clock-frequency = <50000000>;
|
||||
};
|
||||
|
||||
|
1
arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
Symbolic link
1
arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../arm/boot/dts/bcm2835-rpi.dtsi
|
@ -1,7 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2837.dtsi"
|
||||
#include "../../../../arm/boot/dts/bcm2835-rpi.dtsi"
|
||||
#include "../../../../arm/boot/dts/bcm283x-rpi-smsc9514.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "../../../../arm/boot/dts/bcm283x.dtsi"
|
||||
#include "bcm283x.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2836";
|
||||
|
1
arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
Symbolic link
1
arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
1
arch/arm64/boot/dts/broadcom/bcm283x.dtsi
Symbolic link
1
arch/arm64/boot/dts/broadcom/bcm283x.dtsi
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../arm/boot/dts/bcm283x.dtsi
|
@ -88,13 +88,13 @@
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(0xff) |
|
||||
IRQ_TYPE_EDGE_RISING)>,
|
||||
IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 14 (GIC_CPU_MASK_RAW(0xff) |
|
||||
IRQ_TYPE_EDGE_RISING)>,
|
||||
IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 11 (GIC_CPU_MASK_RAW(0xff) |
|
||||
IRQ_TYPE_EDGE_RISING)>,
|
||||
IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 10 (GIC_CPU_MASK_RAW(0xff) |
|
||||
IRQ_TYPE_EDGE_RISING)>;
|
||||
IRQ_TYPE_LEVEL_LOW)>;
|
||||
};
|
||||
|
||||
pmu {
|
||||
|
@ -354,10 +354,10 @@
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <1 13 0xff01>,
|
||||
<1 14 0xff01>,
|
||||
<1 11 0xff01>,
|
||||
<1 10 0xff01>;
|
||||
interrupts = <1 13 4>,
|
||||
<1 14 4>,
|
||||
<1 11 4>,
|
||||
<1 10 4>;
|
||||
};
|
||||
|
||||
pmu {
|
||||
|
@ -473,10 +473,10 @@
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <1 13 0xff01>,
|
||||
<1 14 0xff01>,
|
||||
<1 11 0xff01>,
|
||||
<1 10 0xff01>;
|
||||
interrupts = <1 13 0xff08>,
|
||||
<1 14 0xff08>,
|
||||
<1 11 0xff08>,
|
||||
<1 10 0xff08>;
|
||||
};
|
||||
|
||||
pmu_system_controller: system-controller@105c0000 {
|
||||
|
@ -119,10 +119,10 @@
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <1 13 0x1>, /* Physical Secure PPI */
|
||||
<1 14 0x1>, /* Physical Non-Secure PPI */
|
||||
<1 11 0x1>, /* Virtual PPI */
|
||||
<1 10 0x1>; /* Hypervisor PPI */
|
||||
interrupts = <1 13 0xf08>, /* Physical Secure PPI */
|
||||
<1 14 0xf08>, /* Physical Non-Secure PPI */
|
||||
<1 11 0xf08>, /* Virtual PPI */
|
||||
<1 10 0xf08>; /* Hypervisor PPI */
|
||||
};
|
||||
|
||||
pmu {
|
||||
|
@ -191,10 +191,10 @@
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <1 13 0x8>, /* Physical Secure PPI, active-low */
|
||||
<1 14 0x8>, /* Physical Non-Secure PPI, active-low */
|
||||
<1 11 0x8>, /* Virtual PPI, active-low */
|
||||
<1 10 0x8>; /* Hypervisor PPI, active-low */
|
||||
interrupts = <1 13 4>, /* Physical Secure PPI, active-low */
|
||||
<1 14 4>, /* Physical Non-Secure PPI, active-low */
|
||||
<1 11 4>, /* Virtual PPI, active-low */
|
||||
<1 10 4>; /* Hypervisor PPI, active-low */
|
||||
};
|
||||
|
||||
pmu {
|
||||
|
@ -122,10 +122,10 @@
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>,
|
||||
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>,
|
||||
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>,
|
||||
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>;
|
||||
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
|
||||
};
|
||||
|
||||
odmi: odmi@300000 {
|
||||
|
@ -129,10 +129,10 @@
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <1 13 0xf01>,
|
||||
<1 14 0xf01>,
|
||||
<1 11 0xf01>,
|
||||
<1 10 0xf01>;
|
||||
interrupts = <1 13 4>,
|
||||
<1 14 4>,
|
||||
<1 11 4>,
|
||||
<1 10 4>;
|
||||
};
|
||||
|
||||
soc {
|
||||
|
@ -65,10 +65,10 @@
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <1 13 0xf01>,
|
||||
<1 14 0xf01>,
|
||||
<1 11 0xf01>,
|
||||
<1 10 0xf01>;
|
||||
interrupts = <1 13 0xf08>,
|
||||
<1 14 0xf08>,
|
||||
<1 11 0xf08>,
|
||||
<1 10 0xf08>;
|
||||
};
|
||||
|
||||
amba_apu {
|
||||
|
@ -216,7 +216,7 @@ static int ctr_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
|
||||
err = blkcipher_walk_done(desc, &walk,
|
||||
walk.nbytes % AES_BLOCK_SIZE);
|
||||
}
|
||||
if (nbytes) {
|
||||
if (walk.nbytes % AES_BLOCK_SIZE) {
|
||||
u8 *tdst = walk.dst.virt.addr + blocks * AES_BLOCK_SIZE;
|
||||
u8 *tsrc = walk.src.virt.addr + blocks * AES_BLOCK_SIZE;
|
||||
u8 __aligned(8) tail[AES_BLOCK_SIZE];
|
||||
|
@ -61,8 +61,6 @@
|
||||
|
||||
#define AARCH64_BREAK_KGDB_DYN_DBG \
|
||||
(AARCH64_BREAK_MON | (KGDB_DYN_DBG_BRK_IMM << 5))
|
||||
#define KGDB_DYN_BRK_INS_BYTE(x) \
|
||||
((AARCH64_BREAK_KGDB_DYN_DBG >> (8 * (x))) & 0xff)
|
||||
|
||||
#define CACHE_FLUSH_IS_SAFE 1
|
||||
|
||||
|
@ -19,10 +19,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <linux/bug.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/kdebug.h>
|
||||
#include <linux/kgdb.h>
|
||||
#include <linux/kprobes.h>
|
||||
#include <asm/debug-monitors.h>
|
||||
#include <asm/insn.h>
|
||||
#include <asm/traps.h>
|
||||
|
||||
struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = {
|
||||
@ -338,15 +341,24 @@ void kgdb_arch_exit(void)
|
||||
unregister_die_notifier(&kgdb_notifier);
|
||||
}
|
||||
|
||||
/*
|
||||
* ARM instructions are always in LE.
|
||||
* Break instruction is encoded in LE format
|
||||
*/
|
||||
struct kgdb_arch arch_kgdb_ops = {
|
||||
.gdb_bpt_instr = {
|
||||
KGDB_DYN_BRK_INS_BYTE(0),
|
||||
KGDB_DYN_BRK_INS_BYTE(1),
|
||||
KGDB_DYN_BRK_INS_BYTE(2),
|
||||
KGDB_DYN_BRK_INS_BYTE(3),
|
||||
}
|
||||
};
|
||||
struct kgdb_arch arch_kgdb_ops;
|
||||
|
||||
int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
|
||||
{
|
||||
int err;
|
||||
|
||||
BUILD_BUG_ON(AARCH64_INSN_SIZE != BREAK_INSTR_SIZE);
|
||||
|
||||
err = aarch64_insn_read((void *)bpt->bpt_addr, (u32 *)bpt->saved_instr);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return aarch64_insn_write((void *)bpt->bpt_addr,
|
||||
(u32)AARCH64_BREAK_KGDB_DYN_DBG);
|
||||
}
|
||||
|
||||
int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
|
||||
{
|
||||
return aarch64_insn_write((void *)bpt->bpt_addr,
|
||||
*(u32 *)bpt->saved_instr);
|
||||
}
|
||||
|
@ -201,12 +201,6 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void smp_store_cpu_info(unsigned int cpuid)
|
||||
{
|
||||
store_cpu_topology(cpuid);
|
||||
numa_store_cpu_info(cpuid);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the secondary CPU boot entry. We're using this CPUs
|
||||
* idle thread stack, but a set of temporary page tables.
|
||||
@ -254,7 +248,7 @@ asmlinkage void secondary_start_kernel(void)
|
||||
*/
|
||||
notify_cpu_starting(cpu);
|
||||
|
||||
smp_store_cpu_info(cpu);
|
||||
store_cpu_topology(cpu);
|
||||
|
||||
/*
|
||||
* OK, now it's safe to let the boot CPU continue. Wait for
|
||||
@ -689,10 +683,13 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
{
|
||||
int err;
|
||||
unsigned int cpu;
|
||||
unsigned int this_cpu;
|
||||
|
||||
init_cpu_topology();
|
||||
|
||||
smp_store_cpu_info(smp_processor_id());
|
||||
this_cpu = smp_processor_id();
|
||||
store_cpu_topology(this_cpu);
|
||||
numa_store_cpu_info(this_cpu);
|
||||
|
||||
/*
|
||||
* If UP is mandated by "nosmp" (which implies "maxcpus=0"), don't set
|
||||
@ -719,6 +716,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
continue;
|
||||
|
||||
set_cpu_present(cpu, true);
|
||||
numa_store_cpu_info(cpu);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ extern __kernel_size_t __copy_user(void *to, const void *from,
|
||||
|
||||
extern __kernel_size_t copy_to_user(void __user *to, const void *from,
|
||||
__kernel_size_t n);
|
||||
extern __kernel_size_t copy_from_user(void *to, const void __user *from,
|
||||
extern __kernel_size_t ___copy_from_user(void *to, const void __user *from,
|
||||
__kernel_size_t n);
|
||||
|
||||
static inline __kernel_size_t __copy_to_user(void __user *to, const void *from,
|
||||
@ -88,6 +88,15 @@ static inline __kernel_size_t __copy_from_user(void *to,
|
||||
{
|
||||
return __copy_user(to, (const void __force *)from, n);
|
||||
}
|
||||
static inline __kernel_size_t copy_from_user(void *to,
|
||||
const void __user *from,
|
||||
__kernel_size_t n)
|
||||
{
|
||||
size_t res = ___copy_from_user(to, from, n);
|
||||
if (unlikely(res))
|
||||
memset(to + (n - res), 0, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
#define __copy_to_user_inatomic __copy_to_user
|
||||
#define __copy_from_user_inatomic __copy_from_user
|
||||
|
@ -36,7 +36,7 @@ EXPORT_SYMBOL(copy_page);
|
||||
/*
|
||||
* Userspace access stuff.
|
||||
*/
|
||||
EXPORT_SYMBOL(copy_from_user);
|
||||
EXPORT_SYMBOL(___copy_from_user);
|
||||
EXPORT_SYMBOL(copy_to_user);
|
||||
EXPORT_SYMBOL(__copy_user);
|
||||
EXPORT_SYMBOL(strncpy_from_user);
|
||||
|
@ -23,13 +23,13 @@
|
||||
*/
|
||||
.text
|
||||
.align 1
|
||||
.global copy_from_user
|
||||
.type copy_from_user, @function
|
||||
copy_from_user:
|
||||
.global ___copy_from_user
|
||||
.type ___copy_from_user, @function
|
||||
___copy_from_user:
|
||||
branch_if_kernel r8, __copy_user
|
||||
ret_if_privileged r8, r11, r10, r10
|
||||
rjmp __copy_user
|
||||
.size copy_from_user, . - copy_from_user
|
||||
.size ___copy_from_user, . - ___copy_from_user
|
||||
|
||||
.global copy_to_user
|
||||
.type copy_to_user, @function
|
||||
|
@ -171,11 +171,12 @@ static inline int bad_user_access_length(void)
|
||||
static inline unsigned long __must_check
|
||||
copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||
{
|
||||
if (access_ok(VERIFY_READ, from, n))
|
||||
if (likely(access_ok(VERIFY_READ, from, n))) {
|
||||
memcpy(to, (const void __force *)from, n);
|
||||
else
|
||||
return n;
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
memset(to, 0, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
static inline unsigned long __must_check
|
||||
|
@ -194,30 +194,6 @@ extern unsigned long __copy_user(void __user *to, const void *from, unsigned lon
|
||||
extern unsigned long __copy_user_zeroing(void *to, const void __user *from, unsigned long n);
|
||||
extern unsigned long __do_clear_user(void __user *to, unsigned long n);
|
||||
|
||||
static inline unsigned long
|
||||
__generic_copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||
{
|
||||
if (access_ok(VERIFY_WRITE, to, n))
|
||||
return __copy_user(to, from, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
__generic_copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||
{
|
||||
if (access_ok(VERIFY_READ, from, n))
|
||||
return __copy_user_zeroing(to, from, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
__generic_clear_user(void __user *to, unsigned long n)
|
||||
{
|
||||
if (access_ok(VERIFY_WRITE, to, n))
|
||||
return __do_clear_user(to, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
static inline long
|
||||
__strncpy_from_user(char *dst, const char __user *src, long count)
|
||||
{
|
||||
@ -282,7 +258,7 @@ __constant_copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||
else if (n == 24)
|
||||
__asm_copy_from_user_24(to, from, ret);
|
||||
else
|
||||
ret = __generic_copy_from_user(to, from, n);
|
||||
ret = __copy_user_zeroing(to, from, n);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -333,7 +309,7 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||
else if (n == 24)
|
||||
__asm_copy_to_user_24(to, from, ret);
|
||||
else
|
||||
ret = __generic_copy_to_user(to, from, n);
|
||||
ret = __copy_user(to, from, n);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -366,26 +342,43 @@ __constant_clear_user(void __user *to, unsigned long n)
|
||||
else if (n == 24)
|
||||
__asm_clear_24(to, ret);
|
||||
else
|
||||
ret = __generic_clear_user(to, n);
|
||||
ret = __do_clear_user(to, n);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#define clear_user(to, n) \
|
||||
(__builtin_constant_p(n) ? \
|
||||
__constant_clear_user(to, n) : \
|
||||
__generic_clear_user(to, n))
|
||||
static inline size_t clear_user(void __user *to, size_t n)
|
||||
{
|
||||
if (unlikely(!access_ok(VERIFY_WRITE, to, n)))
|
||||
return n;
|
||||
if (__builtin_constant_p(n))
|
||||
return __constant_clear_user(to, n);
|
||||
else
|
||||
return __do_clear_user(to, n);
|
||||
}
|
||||
|
||||
#define copy_from_user(to, from, n) \
|
||||
(__builtin_constant_p(n) ? \
|
||||
__constant_copy_from_user(to, from, n) : \
|
||||
__generic_copy_from_user(to, from, n))
|
||||
static inline size_t copy_from_user(void *to, const void __user *from, size_t n)
|
||||
{
|
||||
if (unlikely(!access_ok(VERIFY_READ, from, n))) {
|
||||
memset(to, 0, n);
|
||||
return n;
|
||||
}
|
||||
if (__builtin_constant_p(n))
|
||||
return __constant_copy_from_user(to, from, n);
|
||||
else
|
||||
return __copy_user_zeroing(to, from, n);
|
||||
}
|
||||
|
||||
#define copy_to_user(to, from, n) \
|
||||
(__builtin_constant_p(n) ? \
|
||||
__constant_copy_to_user(to, from, n) : \
|
||||
__generic_copy_to_user(to, from, n))
|
||||
static inline size_t copy_to_user(void __user *to, const void *from, size_t n)
|
||||
{
|
||||
if (unlikely(!access_ok(VERIFY_WRITE, to, n)))
|
||||
return n;
|
||||
if (__builtin_constant_p(n))
|
||||
return __constant_copy_to_user(to, from, n);
|
||||
else
|
||||
return __copy_user(to, from, n);
|
||||
}
|
||||
|
||||
/* We let the __ versions of copy_from/to_user inline, because they're often
|
||||
* used in fast paths and have only a small space overhead.
|
||||
|
@ -263,19 +263,25 @@ do { \
|
||||
extern long __memset_user(void *dst, unsigned long count);
|
||||
extern long __memcpy_user(void *dst, const void *src, unsigned long count);
|
||||
|
||||
#define clear_user(dst,count) __memset_user(____force(dst), (count))
|
||||
#define __clear_user(dst,count) __memset_user(____force(dst), (count))
|
||||
#define __copy_from_user_inatomic(to, from, n) __memcpy_user((to), ____force(from), (n))
|
||||
#define __copy_to_user_inatomic(to, from, n) __memcpy_user(____force(to), (from), (n))
|
||||
|
||||
#else
|
||||
|
||||
#define clear_user(dst,count) (memset(____force(dst), 0, (count)), 0)
|
||||
#define __clear_user(dst,count) (memset(____force(dst), 0, (count)), 0)
|
||||
#define __copy_from_user_inatomic(to, from, n) (memcpy((to), ____force(from), (n)), 0)
|
||||
#define __copy_to_user_inatomic(to, from, n) (memcpy(____force(to), (from), (n)), 0)
|
||||
|
||||
#endif
|
||||
|
||||
#define __clear_user clear_user
|
||||
static inline unsigned long __must_check
|
||||
clear_user(void __user *to, unsigned long n)
|
||||
{
|
||||
if (likely(__access_ok(to, n)))
|
||||
n = __clear_user(to, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
static inline unsigned long __must_check
|
||||
__copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||
|
@ -103,7 +103,8 @@ static inline long hexagon_strncpy_from_user(char *dst, const char __user *src,
|
||||
{
|
||||
long res = __strnlen_user(src, n);
|
||||
|
||||
/* return from strnlen can't be zero -- that would be rubbish. */
|
||||
if (unlikely(!res))
|
||||
return -EFAULT;
|
||||
|
||||
if (res > n) {
|
||||
copy_from_user(dst, src, n);
|
||||
|
@ -269,19 +269,16 @@ __copy_from_user (void *to, const void __user *from, unsigned long count)
|
||||
__cu_len; \
|
||||
})
|
||||
|
||||
#define copy_from_user(to, from, n) \
|
||||
({ \
|
||||
void *__cu_to = (to); \
|
||||
const void __user *__cu_from = (from); \
|
||||
long __cu_len = (n); \
|
||||
\
|
||||
__chk_user_ptr(__cu_from); \
|
||||
if (__access_ok(__cu_from, __cu_len, get_fs())) { \
|
||||
check_object_size(__cu_to, __cu_len, false); \
|
||||
__cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \
|
||||
} \
|
||||
__cu_len; \
|
||||
})
|
||||
static inline unsigned long
|
||||
copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||
{
|
||||
check_object_size(to, n, false);
|
||||
if (likely(__access_ok(from, n, get_fs())))
|
||||
n = __copy_user((__force void __user *) to, from, n);
|
||||
else
|
||||
memset(to, 0, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
#define __copy_in_user(to, from, size) __copy_user((to), (from), (size))
|
||||
|
||||
|
@ -219,7 +219,7 @@ extern int fixup_exception(struct pt_regs *regs);
|
||||
#define __get_user_nocheck(x, ptr, size) \
|
||||
({ \
|
||||
long __gu_err = 0; \
|
||||
unsigned long __gu_val; \
|
||||
unsigned long __gu_val = 0; \
|
||||
might_fault(); \
|
||||
__get_user_size(__gu_val, (ptr), (size), __gu_err); \
|
||||
(x) = (__force __typeof__(*(ptr)))__gu_val; \
|
||||
|
@ -204,8 +204,9 @@ extern unsigned long __must_check __copy_user_zeroing(void *to,
|
||||
static inline unsigned long
|
||||
copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||
{
|
||||
if (access_ok(VERIFY_READ, from, n))
|
||||
if (likely(access_ok(VERIFY_READ, from, n)))
|
||||
return __copy_user_zeroing(to, from, n);
|
||||
memset(to, 0, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ extern long __user_bad(void);
|
||||
|
||||
#define __get_user(x, ptr) \
|
||||
({ \
|
||||
unsigned long __gu_val; \
|
||||
unsigned long __gu_val = 0; \
|
||||
/*unsigned long __gu_ptr = (unsigned long)(ptr);*/ \
|
||||
long __gu_err; \
|
||||
switch (sizeof(*(ptr))) { \
|
||||
@ -373,10 +373,13 @@ extern long __user_bad(void);
|
||||
static inline long copy_from_user(void *to,
|
||||
const void __user *from, unsigned long n)
|
||||
{
|
||||
unsigned long res = n;
|
||||
might_fault();
|
||||
if (access_ok(VERIFY_READ, from, n))
|
||||
return __copy_from_user(to, from, n);
|
||||
return n;
|
||||
if (likely(access_ok(VERIFY_READ, from, n)))
|
||||
res = __copy_from_user(to, from, n);
|
||||
if (unlikely(res))
|
||||
memset(to + (n - res), 0, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
#define __copy_to_user(to, from, n) \
|
||||
|
@ -65,6 +65,7 @@ config MIPS
|
||||
select ARCH_CLOCKSOURCE_DATA
|
||||
select HANDLE_DOMAIN_IRQ
|
||||
select HAVE_EXIT_THREAD
|
||||
select HAVE_REGS_AND_STACK_ACCESS_API
|
||||
|
||||
menu "Machine selection"
|
||||
|
||||
|
@ -113,42 +113,6 @@ config SPINLOCK_TEST
|
||||
help
|
||||
Add several files to the debugfs to test spinlock speed.
|
||||
|
||||
if CPU_MIPSR6
|
||||
|
||||
choice
|
||||
prompt "Compact branch policy"
|
||||
default MIPS_COMPACT_BRANCHES_OPTIMAL
|
||||
|
||||
config MIPS_COMPACT_BRANCHES_NEVER
|
||||
bool "Never (force delay slot branches)"
|
||||
help
|
||||
Pass the -mcompact-branches=never flag to the compiler in order to
|
||||
force it to always emit branches with delay slots, and make no use
|
||||
of the compact branch instructions introduced by MIPSr6. This is
|
||||
useful if you suspect there may be an issue with compact branches in
|
||||
either the compiler or the CPU.
|
||||
|
||||
config MIPS_COMPACT_BRANCHES_OPTIMAL
|
||||
bool "Optimal (use where beneficial)"
|
||||
help
|
||||
Pass the -mcompact-branches=optimal flag to the compiler in order for
|
||||
it to make use of compact branch instructions where it deems them
|
||||
beneficial, and use branches with delay slots elsewhere. This is the
|
||||
default compiler behaviour, and should be used unless you have a
|
||||
reason to choose otherwise.
|
||||
|
||||
config MIPS_COMPACT_BRANCHES_ALWAYS
|
||||
bool "Always (force compact branches)"
|
||||
help
|
||||
Pass the -mcompact-branches=always flag to the compiler in order to
|
||||
force it to always emit compact branches, making no use of branch
|
||||
instructions with delay slots. This can result in more compact code
|
||||
which may be beneficial in some scenarios.
|
||||
|
||||
endchoice
|
||||
|
||||
endif # CPU_MIPSR6
|
||||
|
||||
config SCACHE_DEBUGFS
|
||||
bool "L2 cache debugfs entries"
|
||||
depends on DEBUG_FS
|
||||
|
@ -203,10 +203,6 @@ endif
|
||||
toolchain-virt := $(call cc-option-yn,$(mips-cflags) -mvirt)
|
||||
cflags-$(toolchain-virt) += -DTOOLCHAIN_SUPPORTS_VIRT
|
||||
|
||||
cflags-$(CONFIG_MIPS_COMPACT_BRANCHES_NEVER) += -mcompact-branches=never
|
||||
cflags-$(CONFIG_MIPS_COMPACT_BRANCHES_OPTIMAL) += -mcompact-branches=optimal
|
||||
cflags-$(CONFIG_MIPS_COMPACT_BRANCHES_ALWAYS) += -mcompact-branches=always
|
||||
|
||||
#
|
||||
# Firmware support
|
||||
#
|
||||
|
@ -96,7 +96,7 @@ static struct clk * __init ath79_reg_ffclk(const char *name,
|
||||
struct clk *clk;
|
||||
|
||||
clk = clk_register_fixed_factor(NULL, name, parent_name, 0, mult, div);
|
||||
if (!clk)
|
||||
if (IS_ERR(clk))
|
||||
panic("failed to allocate %s clock structure", name);
|
||||
|
||||
return clk;
|
||||
|
@ -1619,6 +1619,12 @@ static int __init octeon_irq_init_gpio(
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear the OF_POPULATED flag that was set by of_irq_init()
|
||||
* so that all GPIO devices will be probed.
|
||||
*/
|
||||
of_node_clear_flag(gpio_node, OF_POPULATED);
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
|
@ -1059,7 +1059,7 @@ static int __init octeon_publish_devices(void)
|
||||
{
|
||||
return of_platform_bus_probe(NULL, octeon_ids, NULL);
|
||||
}
|
||||
device_initcall(octeon_publish_devices);
|
||||
arch_initcall(octeon_publish_devices);
|
||||
|
||||
MODULE_AUTHOR("David Daney <ddaney@caviumnetworks.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -146,7 +146,25 @@
|
||||
/*
|
||||
* Find irq with highest priority
|
||||
*/
|
||||
PTR_LA t1,cpu_mask_nr_tbl
|
||||
# open coded PTR_LA t1, cpu_mask_nr_tbl
|
||||
#if (_MIPS_SZPTR == 32)
|
||||
# open coded la t1, cpu_mask_nr_tbl
|
||||
lui t1, %hi(cpu_mask_nr_tbl)
|
||||
addiu t1, %lo(cpu_mask_nr_tbl)
|
||||
|
||||
#endif
|
||||
#if (_MIPS_SZPTR == 64)
|
||||
# open coded dla t1, cpu_mask_nr_tbl
|
||||
.set push
|
||||
.set noat
|
||||
lui t1, %highest(cpu_mask_nr_tbl)
|
||||
lui AT, %hi(cpu_mask_nr_tbl)
|
||||
daddiu t1, t1, %higher(cpu_mask_nr_tbl)
|
||||
daddiu AT, AT, %lo(cpu_mask_nr_tbl)
|
||||
dsll t1, 32
|
||||
daddu t1, t1, AT
|
||||
.set pop
|
||||
#endif
|
||||
1: lw t2,(t1)
|
||||
nop
|
||||
and t2,t0
|
||||
@ -195,7 +213,25 @@
|
||||
/*
|
||||
* Find irq with highest priority
|
||||
*/
|
||||
PTR_LA t1,asic_mask_nr_tbl
|
||||
# open coded PTR_LA t1,asic_mask_nr_tbl
|
||||
#if (_MIPS_SZPTR == 32)
|
||||
# open coded la t1, asic_mask_nr_tbl
|
||||
lui t1, %hi(asic_mask_nr_tbl)
|
||||
addiu t1, %lo(asic_mask_nr_tbl)
|
||||
|
||||
#endif
|
||||
#if (_MIPS_SZPTR == 64)
|
||||
# open coded dla t1, asic_mask_nr_tbl
|
||||
.set push
|
||||
.set noat
|
||||
lui t1, %highest(asic_mask_nr_tbl)
|
||||
lui AT, %hi(asic_mask_nr_tbl)
|
||||
daddiu t1, t1, %higher(asic_mask_nr_tbl)
|
||||
daddiu AT, AT, %lo(asic_mask_nr_tbl)
|
||||
dsll t1, 32
|
||||
daddu t1, t1, AT
|
||||
.set pop
|
||||
#endif
|
||||
2: lw t2,(t1)
|
||||
nop
|
||||
and t2,t0
|
||||
|
@ -157,6 +157,7 @@
|
||||
ldc1 $f28, THREAD_FPR28(\thread)
|
||||
ldc1 $f30, THREAD_FPR30(\thread)
|
||||
ctc1 \tmp, fcr31
|
||||
.set pop
|
||||
.endm
|
||||
|
||||
.macro fpu_restore_16odd thread
|
||||
|
@ -15,8 +15,8 @@
|
||||
static inline bool __should_swizzle_bits(volatile void *a)
|
||||
{
|
||||
extern const bool octeon_should_swizzle_table[];
|
||||
u64 did = ((u64)(uintptr_t)a >> 40) & 0xff;
|
||||
|
||||
unsigned long did = ((unsigned long)a >> 40) & 0xff;
|
||||
return octeon_should_swizzle_table[did];
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ static inline bool __should_swizzle_bits(volatile void *a)
|
||||
|
||||
#define __should_swizzle_bits(a) false
|
||||
|
||||
static inline bool __should_swizzle_addr(unsigned long p)
|
||||
static inline bool __should_swizzle_addr(u64 p)
|
||||
{
|
||||
/* boot bus? */
|
||||
return ((p >> 40) & 0xff) == 0;
|
||||
|
@ -11,11 +11,13 @@
|
||||
#define CP0_EBASE $15, 1
|
||||
|
||||
.macro kernel_entry_setup
|
||||
#ifdef CONFIG_SMP
|
||||
mfc0 t0, CP0_EBASE
|
||||
andi t0, t0, 0x3ff # CPUNum
|
||||
beqz t0, 1f
|
||||
# CPUs other than zero goto smp_bootstrap
|
||||
j smp_bootstrap
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
1:
|
||||
.endm
|
||||
|
@ -458,10 +458,21 @@ static inline int mips_cm_revision(void)
|
||||
static inline unsigned int mips_cm_max_vp_width(void)
|
||||
{
|
||||
extern int smp_num_siblings;
|
||||
uint32_t cfg;
|
||||
|
||||
if (mips_cm_revision() >= CM_REV_CM3)
|
||||
return read_gcr_sys_config2() & CM_GCR_SYS_CONFIG2_MAXVPW_MSK;
|
||||
|
||||
if (mips_cm_present()) {
|
||||
/*
|
||||
* We presume that all cores in the system will have the same
|
||||
* number of VP(E)s, and if that ever changes then this will
|
||||
* need revisiting.
|
||||
*/
|
||||
cfg = read_gcr_cl_config() & CM_GCR_Cx_CONFIG_PVPE_MSK;
|
||||
return (cfg >> CM_GCR_Cx_CONFIG_PVPE_SHF) + 1;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_SMP))
|
||||
return smp_num_siblings;
|
||||
|
||||
|
@ -660,8 +660,6 @@
|
||||
|
||||
#define MIPS_CONF7_IAR (_ULCAST_(1) << 10)
|
||||
#define MIPS_CONF7_AR (_ULCAST_(1) << 16)
|
||||
/* FTLB probability bits for R6 */
|
||||
#define MIPS_CONF7_FTLBP_SHIFT (18)
|
||||
|
||||
/* WatchLo* register definitions */
|
||||
#define MIPS_WATCHLO_IRW (_ULCAST_(0x7) << 0)
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/thread_info.h>
|
||||
#include <linux/string.h>
|
||||
#include <asm/asm-eva.h>
|
||||
|
||||
/*
|
||||
@ -1170,6 +1171,8 @@ extern size_t __copy_in_user_eva(void *__to, const void *__from, size_t __n);
|
||||
__cu_len = __invoke_copy_from_user(__cu_to, \
|
||||
__cu_from, \
|
||||
__cu_len); \
|
||||
} else { \
|
||||
memset(__cu_to, 0, __cu_len); \
|
||||
} \
|
||||
} \
|
||||
__cu_len; \
|
||||
|
@ -36,7 +36,6 @@ struct arch_uprobe {
|
||||
unsigned long resume_epc;
|
||||
u32 insn[2];
|
||||
u32 ixol[2];
|
||||
union mips_instruction orig_inst[MAX_UINSN_BYTES / 4];
|
||||
};
|
||||
|
||||
struct arch_uprobe_task {
|
||||
|
@ -352,7 +352,12 @@ __setup("nohtw", htw_disable);
|
||||
static int mips_ftlb_disabled;
|
||||
static int mips_has_ftlb_configured;
|
||||
|
||||
static int set_ftlb_enable(struct cpuinfo_mips *c, int enable);
|
||||
enum ftlb_flags {
|
||||
FTLB_EN = 1 << 0,
|
||||
FTLB_SET_PROB = 1 << 1,
|
||||
};
|
||||
|
||||
static int set_ftlb_enable(struct cpuinfo_mips *c, enum ftlb_flags flags);
|
||||
|
||||
static int __init ftlb_disable(char *s)
|
||||
{
|
||||
@ -371,8 +376,6 @@ static int __init ftlb_disable(char *s)
|
||||
return 1;
|
||||
}
|
||||
|
||||
back_to_back_c0_hazard();
|
||||
|
||||
config4 = read_c0_config4();
|
||||
|
||||
/* Check that FTLB has been disabled */
|
||||
@ -531,7 +534,7 @@ static unsigned int calculate_ftlb_probability(struct cpuinfo_mips *c)
|
||||
return 3;
|
||||
}
|
||||
|
||||
static int set_ftlb_enable(struct cpuinfo_mips *c, int enable)
|
||||
static int set_ftlb_enable(struct cpuinfo_mips *c, enum ftlb_flags flags)
|
||||
{
|
||||
unsigned int config;
|
||||
|
||||
@ -542,33 +545,33 @@ static int set_ftlb_enable(struct cpuinfo_mips *c, int enable)
|
||||
case CPU_P6600:
|
||||
/* proAptiv & related cores use Config6 to enable the FTLB */
|
||||
config = read_c0_config6();
|
||||
/* Clear the old probability value */
|
||||
config &= ~(3 << MIPS_CONF6_FTLBP_SHIFT);
|
||||
if (enable)
|
||||
/* Enable FTLB */
|
||||
write_c0_config6(config |
|
||||
(calculate_ftlb_probability(c)
|
||||
<< MIPS_CONF6_FTLBP_SHIFT)
|
||||
| MIPS_CONF6_FTLBEN);
|
||||
|
||||
if (flags & FTLB_EN)
|
||||
config |= MIPS_CONF6_FTLBEN;
|
||||
else
|
||||
/* Disable FTLB */
|
||||
write_c0_config6(config & ~MIPS_CONF6_FTLBEN);
|
||||
config &= ~MIPS_CONF6_FTLBEN;
|
||||
|
||||
if (flags & FTLB_SET_PROB) {
|
||||
config &= ~(3 << MIPS_CONF6_FTLBP_SHIFT);
|
||||
config |= calculate_ftlb_probability(c)
|
||||
<< MIPS_CONF6_FTLBP_SHIFT;
|
||||
}
|
||||
|
||||
write_c0_config6(config);
|
||||
back_to_back_c0_hazard();
|
||||
break;
|
||||
case CPU_I6400:
|
||||
/* I6400 & related cores use Config7 to configure FTLB */
|
||||
config = read_c0_config7();
|
||||
/* Clear the old probability value */
|
||||
config &= ~(3 << MIPS_CONF7_FTLBP_SHIFT);
|
||||
write_c0_config7(config | (calculate_ftlb_probability(c)
|
||||
<< MIPS_CONF7_FTLBP_SHIFT));
|
||||
break;
|
||||
/* There's no way to disable the FTLB */
|
||||
if (!(flags & FTLB_EN))
|
||||
return 1;
|
||||
return 0;
|
||||
case CPU_LOONGSON3:
|
||||
/* Flush ITLB, DTLB, VTLB and FTLB */
|
||||
write_c0_diag(LOONGSON_DIAG_ITLB | LOONGSON_DIAG_DTLB |
|
||||
LOONGSON_DIAG_VTLB | LOONGSON_DIAG_FTLB);
|
||||
/* Loongson-3 cores use Config6 to enable the FTLB */
|
||||
config = read_c0_config6();
|
||||
if (enable)
|
||||
if (flags & FTLB_EN)
|
||||
/* Enable FTLB */
|
||||
write_c0_config6(config & ~MIPS_CONF6_FTLBDIS);
|
||||
else
|
||||
@ -788,6 +791,7 @@ static inline unsigned int decode_config4(struct cpuinfo_mips *c)
|
||||
PAGE_SIZE, config4);
|
||||
/* Switch FTLB off */
|
||||
set_ftlb_enable(c, 0);
|
||||
mips_ftlb_disabled = 1;
|
||||
break;
|
||||
}
|
||||
c->tlbsizeftlbsets = 1 <<
|
||||
@ -852,7 +856,7 @@ static void decode_configs(struct cpuinfo_mips *c)
|
||||
c->scache.flags = MIPS_CACHE_NOT_PRESENT;
|
||||
|
||||
/* Enable FTLB if present and not disabled */
|
||||
set_ftlb_enable(c, !mips_ftlb_disabled);
|
||||
set_ftlb_enable(c, mips_ftlb_disabled ? 0 : FTLB_EN);
|
||||
|
||||
ok = decode_config0(c); /* Read Config registers. */
|
||||
BUG_ON(!ok); /* Arch spec violation! */
|
||||
@ -902,6 +906,9 @@ static void decode_configs(struct cpuinfo_mips *c)
|
||||
}
|
||||
}
|
||||
|
||||
/* configure the FTLB write probability */
|
||||
set_ftlb_enable(c, (mips_ftlb_disabled ? 0 : FTLB_EN) | FTLB_SET_PROB);
|
||||
|
||||
mips_probe_watch_registers(c);
|
||||
|
||||
#ifndef CONFIG_MIPS_CPS
|
||||
|
@ -142,9 +142,8 @@ LEAF(__r4k_wait)
|
||||
PTR_LA k1, __r4k_wait
|
||||
ori k0, 0x1f /* 32 byte rollback region */
|
||||
xori k0, 0x1f
|
||||
bne k0, k1, 9f
|
||||
bne k0, k1, \handler
|
||||
MTC0 k0, CP0_EPC
|
||||
9:
|
||||
.set pop
|
||||
.endm
|
||||
|
||||
|
@ -1164,7 +1164,9 @@ fpu_emul:
|
||||
regs->regs[31] = r31;
|
||||
regs->cp0_epc = epc;
|
||||
if (!used_math()) { /* First time FPU user. */
|
||||
preempt_disable();
|
||||
err = init_fpu();
|
||||
preempt_enable();
|
||||
set_used_math();
|
||||
}
|
||||
lose_fpu(1); /* Save FPU state for the emulator. */
|
||||
|
@ -605,14 +605,14 @@ int mips_set_process_fp_mode(struct task_struct *task, unsigned int value)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* Avoid inadvertently triggering emulation */
|
||||
if ((value & PR_FP_MODE_FR) && cpu_has_fpu &&
|
||||
!(current_cpu_data.fpu_id & MIPS_FPIR_F64))
|
||||
if ((value & PR_FP_MODE_FR) && raw_cpu_has_fpu &&
|
||||
!(raw_current_cpu_data.fpu_id & MIPS_FPIR_F64))
|
||||
return -EOPNOTSUPP;
|
||||
if ((value & PR_FP_MODE_FRE) && cpu_has_fpu && !cpu_has_fre)
|
||||
if ((value & PR_FP_MODE_FRE) && raw_cpu_has_fpu && !cpu_has_fre)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* FR = 0 not supported in MIPS R6 */
|
||||
if (!(value & PR_FP_MODE_FR) && cpu_has_fpu && cpu_has_mips_r6)
|
||||
if (!(value & PR_FP_MODE_FR) && raw_cpu_has_fpu && cpu_has_mips_r6)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* Proceed with the mode switch */
|
||||
|
@ -87,6 +87,13 @@ void __init add_memory_region(phys_addr_t start, phys_addr_t size, long type)
|
||||
int x = boot_mem_map.nr_map;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* If the region reaches the top of the physical address space, adjust
|
||||
* the size slightly so that (start + size) doesn't overflow
|
||||
*/
|
||||
if (start + size - 1 == (phys_addr_t)ULLONG_MAX)
|
||||
--size;
|
||||
|
||||
/* Sanity check */
|
||||
if (start + size < start) {
|
||||
pr_warn("Trying to add an invalid memory region, skipped\n");
|
||||
@ -757,7 +764,6 @@ static void __init arch_mem_init(char **cmdline_p)
|
||||
device_tree_init();
|
||||
sparse_init();
|
||||
plat_swiotlb_setup();
|
||||
paging_init();
|
||||
|
||||
dma_contiguous_reserve(PFN_PHYS(max_low_pfn));
|
||||
/* Tell bootmem about cma reserved memblock section */
|
||||
@ -870,6 +876,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
prefill_possible_map();
|
||||
|
||||
cpu_cache_init();
|
||||
paging_init();
|
||||
}
|
||||
|
||||
unsigned long kernelsp[NR_CPUS];
|
||||
|
@ -513,7 +513,7 @@ static void cps_cpu_die(unsigned int cpu)
|
||||
* in which case the CPC will refuse to power down the core.
|
||||
*/
|
||||
do {
|
||||
mips_cm_lock_other(core, vpe_id);
|
||||
mips_cm_lock_other(core, 0);
|
||||
mips_cpc_lock_other(core);
|
||||
stat = read_cpc_co_stat_conf();
|
||||
stat &= CPC_Cx_STAT_CONF_SEQSTATE_MSK;
|
||||
|
@ -322,6 +322,9 @@ asmlinkage void start_secondary(void)
|
||||
cpumask_set_cpu(cpu, &cpu_coherent_mask);
|
||||
notify_cpu_starting(cpu);
|
||||
|
||||
cpumask_set_cpu(cpu, &cpu_callin_map);
|
||||
synchronise_count_slave(cpu);
|
||||
|
||||
set_cpu_online(cpu, true);
|
||||
|
||||
set_cpu_sibling_map(cpu);
|
||||
@ -329,10 +332,6 @@ asmlinkage void start_secondary(void)
|
||||
|
||||
calculate_cpu_foreign_map();
|
||||
|
||||
cpumask_set_cpu(cpu, &cpu_callin_map);
|
||||
|
||||
synchronise_count_slave(cpu);
|
||||
|
||||
/*
|
||||
* irq will be enabled in ->smp_finish(), enabling it too early
|
||||
* is dangerous.
|
||||
|
@ -157,7 +157,6 @@ bool is_trap_insn(uprobe_opcode_t *insn)
|
||||
int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs)
|
||||
{
|
||||
struct uprobe_task *utask = current->utask;
|
||||
union mips_instruction insn;
|
||||
|
||||
/*
|
||||
* Now find the EPC where to resume after the breakpoint has been
|
||||
@ -168,10 +167,10 @@ int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs)
|
||||
unsigned long epc;
|
||||
|
||||
epc = regs->cp0_epc;
|
||||
__compute_return_epc_for_insn(regs, insn);
|
||||
__compute_return_epc_for_insn(regs,
|
||||
(union mips_instruction) aup->insn[0]);
|
||||
aup->resume_epc = regs->cp0_epc;
|
||||
}
|
||||
|
||||
utask->autask.saved_trap_nr = current->thread.trap_nr;
|
||||
current->thread.trap_nr = UPROBE_TRAP_NR;
|
||||
regs->cp0_epc = current->utask->xol_vaddr;
|
||||
@ -222,7 +221,7 @@ int arch_uprobe_exception_notify(struct notifier_block *self,
|
||||
return NOTIFY_DONE;
|
||||
|
||||
switch (val) {
|
||||
case DIE_BREAK:
|
||||
case DIE_UPROBE:
|
||||
if (uprobe_pre_sstep_notifier(regs))
|
||||
return NOTIFY_STOP;
|
||||
break;
|
||||
@ -257,7 +256,7 @@ unsigned long arch_uretprobe_hijack_return_addr(
|
||||
ra = regs->regs[31];
|
||||
|
||||
/* Replace the return address with the trampoline address */
|
||||
regs->regs[31] = ra;
|
||||
regs->regs[31] = trampoline_vaddr;
|
||||
|
||||
return ra;
|
||||
}
|
||||
@ -280,24 +279,6 @@ int __weak set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm,
|
||||
return uprobe_write_opcode(mm, vaddr, UPROBE_SWBP_INSN);
|
||||
}
|
||||
|
||||
/**
|
||||
* set_orig_insn - Restore the original instruction.
|
||||
* @mm: the probed process address space.
|
||||
* @auprobe: arch specific probepoint information.
|
||||
* @vaddr: the virtual address to insert the opcode.
|
||||
*
|
||||
* For mm @mm, restore the original opcode (opcode) at @vaddr.
|
||||
* Return 0 (success) or a negative errno.
|
||||
*
|
||||
* This overrides the weak version in kernel/events/uprobes.c.
|
||||
*/
|
||||
int set_orig_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
|
||||
unsigned long vaddr)
|
||||
{
|
||||
return uprobe_write_opcode(mm, vaddr,
|
||||
*(uprobe_opcode_t *)&auprobe->orig_inst[0].word);
|
||||
}
|
||||
|
||||
void __weak arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
|
||||
void *src, unsigned long len)
|
||||
{
|
||||
|
@ -39,16 +39,16 @@ static struct vm_special_mapping vdso_vvar_mapping = {
|
||||
static void __init init_vdso_image(struct mips_vdso_image *image)
|
||||
{
|
||||
unsigned long num_pages, i;
|
||||
unsigned long data_pfn;
|
||||
|
||||
BUG_ON(!PAGE_ALIGNED(image->data));
|
||||
BUG_ON(!PAGE_ALIGNED(image->size));
|
||||
|
||||
num_pages = image->size / PAGE_SIZE;
|
||||
|
||||
for (i = 0; i < num_pages; i++) {
|
||||
image->mapping.pages[i] =
|
||||
virt_to_page(image->data + (i * PAGE_SIZE));
|
||||
}
|
||||
data_pfn = __phys_to_pfn(__pa_symbol(image->data));
|
||||
for (i = 0; i < num_pages; i++)
|
||||
image->mapping.pages[i] = pfn_to_page(data_pfn + i);
|
||||
}
|
||||
|
||||
static int __init init_vdso(void)
|
||||
|
@ -298,5 +298,6 @@ bool do_dsemulret(struct pt_regs *xcp)
|
||||
/* Set EPC to return to post-branch instruction */
|
||||
xcp->cp0_epc = current->thread.bd_emu_cont_pc;
|
||||
pr_debug("dsemulret to 0x%08lx\n", xcp->cp0_epc);
|
||||
MIPS_FPU_EMU_INC_STATS(ds_emul);
|
||||
return true;
|
||||
}
|
||||
|
@ -800,7 +800,7 @@ static void r4k_flush_icache_range(unsigned long start, unsigned long end)
|
||||
* If address-based cache ops don't require an SMP call, then
|
||||
* use them exclusively for small flushes.
|
||||
*/
|
||||
size = start - end;
|
||||
size = end - start;
|
||||
cache_size = icache_size;
|
||||
if (!cpu_has_ic_fills_f_dc) {
|
||||
size *= 2;
|
||||
|
@ -261,7 +261,6 @@ unsigned __weak platform_maar_init(unsigned num_pairs)
|
||||
{
|
||||
struct maar_config cfg[BOOT_MEM_MAP_MAX];
|
||||
unsigned i, num_configured, num_cfg = 0;
|
||||
phys_addr_t skip;
|
||||
|
||||
for (i = 0; i < boot_mem_map.nr_map; i++) {
|
||||
switch (boot_mem_map.map[i].type) {
|
||||
@ -272,14 +271,14 @@ unsigned __weak platform_maar_init(unsigned num_pairs)
|
||||
continue;
|
||||
}
|
||||
|
||||
skip = 0x10000 - (boot_mem_map.map[i].addr & 0xffff);
|
||||
|
||||
/* Round lower up */
|
||||
cfg[num_cfg].lower = boot_mem_map.map[i].addr;
|
||||
cfg[num_cfg].lower += skip;
|
||||
cfg[num_cfg].lower = (cfg[num_cfg].lower + 0xffff) & ~0xffff;
|
||||
|
||||
cfg[num_cfg].upper = cfg[num_cfg].lower;
|
||||
cfg[num_cfg].upper += boot_mem_map.map[i].size - 1;
|
||||
cfg[num_cfg].upper -= skip;
|
||||
/* Round upper down */
|
||||
cfg[num_cfg].upper = boot_mem_map.map[i].addr +
|
||||
boot_mem_map.map[i].size;
|
||||
cfg[num_cfg].upper = (cfg[num_cfg].upper & ~0xffff) - 1;
|
||||
|
||||
cfg[num_cfg].attrs = MIPS_MAAR_S;
|
||||
num_cfg++;
|
||||
@ -441,6 +440,9 @@ static inline void mem_init_free_highmem(void)
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
unsigned long tmp;
|
||||
|
||||
if (cpu_has_dc_aliases)
|
||||
return;
|
||||
|
||||
for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) {
|
||||
struct page *page = pfn_to_page(tmp);
|
||||
|
||||
|
@ -39,6 +39,9 @@
|
||||
#include <linux/console.h>
|
||||
#endif
|
||||
|
||||
#define ROCIT_CONFIG_GEN0 0x1f403000
|
||||
#define ROCIT_CONFIG_GEN0_PCI_IOCU BIT(7)
|
||||
|
||||
extern void malta_be_init(void);
|
||||
extern int malta_be_handler(struct pt_regs *regs, int is_fixup);
|
||||
|
||||
@ -107,6 +110,8 @@ static void __init fd_activate(void)
|
||||
static int __init plat_enable_iocoherency(void)
|
||||
{
|
||||
int supported = 0;
|
||||
u32 cfg;
|
||||
|
||||
if (mips_revision_sconid == MIPS_REVISION_SCON_BONITO) {
|
||||
if (BONITO_PCICACHECTRL & BONITO_PCICACHECTRL_CPUCOH_PRES) {
|
||||
BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_CPUCOH_EN;
|
||||
@ -129,7 +134,8 @@ static int __init plat_enable_iocoherency(void)
|
||||
} else if (mips_cm_numiocu() != 0) {
|
||||
/* Nothing special needs to be done to enable coherency */
|
||||
pr_info("CMP IOCU detected\n");
|
||||
if ((*(unsigned int *)0xbf403000 & 0x81) != 0x81) {
|
||||
cfg = __raw_readl((u32 *)CKSEG1ADDR(ROCIT_CONFIG_GEN0));
|
||||
if (!(cfg & ROCIT_CONFIG_GEN0_PCI_IOCU)) {
|
||||
pr_crit("IOCU OPERATION DISABLED BY SWITCH - DEFAULTING TO SW IO COHERENCY\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -166,6 +166,7 @@ struct __large_struct { unsigned long buf[100]; };
|
||||
"2:\n" \
|
||||
" .section .fixup,\"ax\"\n" \
|
||||
"3:\n\t" \
|
||||
" mov 0,%1\n" \
|
||||
" mov %3,%0\n" \
|
||||
" jmp 2b\n" \
|
||||
" .previous\n" \
|
||||
|
@ -9,7 +9,7 @@
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the Licence, or (at your option) any later version.
|
||||
*/
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
unsigned long
|
||||
__generic_copy_to_user(void *to, const void *from, unsigned long n)
|
||||
@ -24,6 +24,8 @@ __generic_copy_from_user(void *to, const void *from, unsigned long n)
|
||||
{
|
||||
if (access_ok(VERIFY_READ, from, n))
|
||||
__copy_user_zeroing(to, from, n);
|
||||
else
|
||||
memset(to, 0, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
@ -102,9 +102,12 @@ extern long __copy_to_user(void __user *to, const void *from, unsigned long n);
|
||||
static inline long copy_from_user(void *to, const void __user *from,
|
||||
unsigned long n)
|
||||
{
|
||||
if (!access_ok(VERIFY_READ, from, n))
|
||||
return n;
|
||||
return __copy_from_user(to, from, n);
|
||||
unsigned long res = n;
|
||||
if (access_ok(VERIFY_READ, from, n))
|
||||
res = __copy_from_user(to, from, n);
|
||||
if (unlikely(res))
|
||||
memset(to + (n - res), 0, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline long copy_to_user(void __user *to, const void *from,
|
||||
@ -139,7 +142,7 @@ extern long strnlen_user(const char __user *s, long n);
|
||||
|
||||
#define __get_user_unknown(val, size, ptr, err) do { \
|
||||
err = 0; \
|
||||
if (copy_from_user(&(val), ptr, size)) { \
|
||||
if (__copy_from_user(&(val), ptr, size)) { \
|
||||
err = -EFAULT; \
|
||||
} \
|
||||
} while (0)
|
||||
@ -166,7 +169,7 @@ do { \
|
||||
({ \
|
||||
long __gu_err = -EFAULT; \
|
||||
const __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \
|
||||
unsigned long __gu_val; \
|
||||
unsigned long __gu_val = 0; \
|
||||
__get_user_common(__gu_val, sizeof(*(ptr)), __gu_ptr, __gu_err);\
|
||||
(x) = (__force __typeof__(x))__gu_val; \
|
||||
__gu_err; \
|
||||
|
@ -273,28 +273,20 @@ __copy_tofrom_user(void *to, const void *from, unsigned long size);
|
||||
static inline unsigned long
|
||||
copy_from_user(void *to, const void *from, unsigned long n)
|
||||
{
|
||||
unsigned long over;
|
||||
unsigned long res = n;
|
||||
|
||||
if (access_ok(VERIFY_READ, from, n))
|
||||
return __copy_tofrom_user(to, from, n);
|
||||
if ((unsigned long)from < TASK_SIZE) {
|
||||
over = (unsigned long)from + n - TASK_SIZE;
|
||||
return __copy_tofrom_user(to, from, n - over) + over;
|
||||
}
|
||||
return n;
|
||||
if (likely(access_ok(VERIFY_READ, from, n)))
|
||||
res = __copy_tofrom_user(to, from, n);
|
||||
if (unlikely(res))
|
||||
memset(to + (n - res), 0, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
copy_to_user(void *to, const void *from, unsigned long n)
|
||||
{
|
||||
unsigned long over;
|
||||
|
||||
if (access_ok(VERIFY_WRITE, to, n))
|
||||
return __copy_tofrom_user(to, from, n);
|
||||
if ((unsigned long)to < TASK_SIZE) {
|
||||
over = (unsigned long)to + n - TASK_SIZE;
|
||||
return __copy_tofrom_user(to, from, n - over) + over;
|
||||
}
|
||||
if (likely(access_ok(VERIFY_WRITE, to, n)))
|
||||
n = __copy_tofrom_user(to, from, n);
|
||||
return n;
|
||||
}
|
||||
|
||||
@ -303,13 +295,8 @@ extern unsigned long __clear_user(void *addr, unsigned long size);
|
||||
static inline __must_check unsigned long
|
||||
clear_user(void *addr, unsigned long size)
|
||||
{
|
||||
|
||||
if (access_ok(VERIFY_WRITE, addr, size))
|
||||
return __clear_user(addr, size);
|
||||
if ((unsigned long)addr < TASK_SIZE) {
|
||||
unsigned long over = (unsigned long)addr + size - TASK_SIZE;
|
||||
return __clear_user(addr, size - over) + over;
|
||||
}
|
||||
if (likely(access_ok(VERIFY_WRITE, addr, size)))
|
||||
size = __clear_user(addr, size);
|
||||
return size;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <asm-generic/uaccess-unaligned.h>
|
||||
|
||||
#include <linux/bug.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#define VERIFY_READ 0
|
||||
#define VERIFY_WRITE 1
|
||||
@ -221,7 +222,7 @@ static inline unsigned long __must_check copy_from_user(void *to,
|
||||
unsigned long n)
|
||||
{
|
||||
int sz = __compiletime_object_size(to);
|
||||
int ret = -EFAULT;
|
||||
unsigned long ret = n;
|
||||
|
||||
if (likely(sz == -1 || sz >= n))
|
||||
ret = __copy_from_user(to, from, n);
|
||||
@ -230,6 +231,8 @@ static inline unsigned long __must_check copy_from_user(void *to,
|
||||
else
|
||||
__bad_copy_user();
|
||||
|
||||
if (unlikely(ret))
|
||||
memset(to + (n - ret), 0, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ static inline bool early_cpu_has_feature(unsigned long feature)
|
||||
#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
|
||||
#include <linux/jump_label.h>
|
||||
|
||||
#define NUM_CPU_FTR_KEYS 64
|
||||
#define NUM_CPU_FTR_KEYS BITS_PER_LONG
|
||||
|
||||
extern struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS];
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user