mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 11:11:26 +02:00
Merge "Merge keystone/android-mainline-keystone-qcom-release.5.16.0 (0570482) into msm-pineapple"
This commit is contained in:
commit
cbaab9440d
|
|
@ -216,7 +216,6 @@ ForEachMacros:
|
|||
- 'for_each_migratetype_order'
|
||||
- 'for_each_msi_entry'
|
||||
- 'for_each_msi_entry_safe'
|
||||
- 'for_each_msi_vector'
|
||||
- 'for_each_net'
|
||||
- 'for_each_net_continue_reverse'
|
||||
- 'for_each_netdev'
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ package(
|
|||
],
|
||||
)
|
||||
|
||||
load("//build/kleaf:common_kernels.bzl", "define_common_kernels")
|
||||
load("//build/kernel/kleaf:common_kernels.bzl", "define_common_kernels")
|
||||
|
||||
define_common_kernels()
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
What: /sys/class/dax/
|
||||
Date: May, 2016
|
||||
KernelVersion: v4.7
|
||||
Contact: nvdimm@lists.linux.dev
|
||||
Description: Device DAX is the device-centric analogue of Filesystem
|
||||
DAX (CONFIG_FS_DAX). It allows memory ranges to be
|
||||
allocated and mapped without need of an intervening file
|
||||
system. Device DAX is strict, precise and predictable.
|
||||
Specifically this interface:
|
||||
|
||||
1. Guarantees fault granularity with respect to a given
|
||||
page size (pte, pmd, or pud) set at configuration time.
|
||||
|
||||
2. Enforces deterministic behavior by being strict about
|
||||
what fault scenarios are supported.
|
||||
|
||||
The /sys/class/dax/ interface enumerates all the
|
||||
device-dax instances in the system. The ABI is
|
||||
deprecated and will be removed after 2020. It is
|
||||
replaced with the DAX bus interface /sys/bus/dax/ where
|
||||
device-dax instances can be found under
|
||||
/sys/bus/dax/devices/
|
||||
|
|
@ -21,11 +21,11 @@ Description: Allow the root user to disable/enable in runtime the clock
|
|||
a different engine to disable/enable its clock gating feature.
|
||||
The bitmask is composed of 20 bits:
|
||||
|
||||
======= ============
|
||||
======= ============
|
||||
0 - 7 DMA channels
|
||||
8 - 11 MME engines
|
||||
12 - 19 TPC engines
|
||||
======= ============
|
||||
======= ============
|
||||
|
||||
The bit's location of a specific engine can be determined
|
||||
using (1 << GAUDI_ENGINE_ID_*). GAUDI_ENGINE_ID_* values
|
||||
|
|
@ -155,6 +155,13 @@ Description: Triggers an I2C transaction that is generated by the device's
|
|||
CPU. Writing to this file generates a write transaction while
|
||||
reading from the file generates a read transaction
|
||||
|
||||
What: /sys/kernel/debug/habanalabs/hl<n>/i2c_len
|
||||
Date: Dec 2021
|
||||
KernelVersion: 5.17
|
||||
Contact: obitton@habana.ai
|
||||
Description: Sets I2C length in bytes for I2C transaction that is generated by
|
||||
the device's CPU
|
||||
|
||||
What: /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
|
||||
Date: Jan 2019
|
||||
KernelVersion: 5.1
|
||||
|
|
@ -226,12 +233,6 @@ Description: Gets the state dump occurring on a CS timeout or failure.
|
|||
Writing an integer X discards X state dumps, so that the
|
||||
next read would return X+1-st newest state dump.
|
||||
|
||||
What: /sys/kernel/debug/habanalabs/hl<n>/timeout_locked
|
||||
Date: Sep 2021
|
||||
KernelVersion: 5.16
|
||||
Contact: obitton@habana.ai
|
||||
Description: Sets the command submission timeout value in seconds.
|
||||
|
||||
What: /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
|
||||
Date: Mar 2020
|
||||
KernelVersion: 5.6
|
||||
|
|
@ -239,6 +240,12 @@ Contact: ogabbay@kernel.org
|
|||
Description: Sets the stop-on_error option for the device engines. Value of
|
||||
"0" is for disable, otherwise enable.
|
||||
|
||||
What: /sys/kernel/debug/habanalabs/hl<n>/timeout_locked
|
||||
Date: Sep 2021
|
||||
KernelVersion: 5.16
|
||||
Contact: obitton@habana.ai
|
||||
Description: Sets the command submission timeout value in seconds.
|
||||
|
||||
What: /sys/kernel/debug/habanalabs/hl<n>/userptr
|
||||
Date: Jan 2019
|
||||
KernelVersion: 5.1
|
||||
|
|
|
|||
16
Documentation/ABI/testing/sysfs-bus-iio-filter-admv8818
Normal file
16
Documentation/ABI/testing/sysfs-bus-iio-filter-admv8818
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
What: /sys/bus/iio/devices/iio:deviceX/filter_mode_available
|
||||
KernelVersion:
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Reading this returns the valid values that can be written to the
|
||||
on_altvoltage0_mode attribute:
|
||||
|
||||
- auto -> Adjust bandpass filter to track changes in input clock rate.
|
||||
- manual -> disable/unregister the clock rate notifier / input clock tracking.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/filter_mode
|
||||
KernelVersion:
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
This attribute configures the filter mode.
|
||||
Reading returns the actual mode.
|
||||
38
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1013
Normal file
38
Documentation/ABI/testing/sysfs-bus-iio-frequency-admv1013
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0-1_i_calibphase
|
||||
KernelVersion:
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read/write unscaled value for the Local Oscillatior path quadrature I phase shift.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0-1_q_calibphase
|
||||
KernelVersion:
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read/write unscaled value for the Local Oscillatior path quadrature Q phase shift.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0_i_calibbias
|
||||
KernelVersion:
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read/write value for the Local Oscillatior Feedthrough Offset Calibration I Positive
|
||||
side.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage0_q_calibbias
|
||||
KernelVersion:
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read/write value for the Local Oscillatior Feedthrough Offset Calibration Q Positive side.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage1_i_calibbias
|
||||
KernelVersion:
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read/write raw value for the Local Oscillatior Feedthrough Offset Calibration I Negative
|
||||
side.
|
||||
|
||||
What: /sys/bus/iio/devices/iio:deviceX/in_altvoltage1_q_calibbias
|
||||
KernelVersion:
|
||||
Contact: linux-iio@vger.kernel.org
|
||||
Description:
|
||||
Read/write raw value for the Local Oscillatior Feedthrough Offset Calibration Q Negative
|
||||
side.
|
||||
|
|
@ -612,8 +612,8 @@
|
|||
clocksource.max_cswd_read_retries= [KNL]
|
||||
Number of clocksource_watchdog() retries due to
|
||||
external delays before the clock will be marked
|
||||
unstable. Defaults to three retries, that is,
|
||||
four attempts to read the clock under test.
|
||||
unstable. Defaults to two retries, that is,
|
||||
three attempts to read the clock under test.
|
||||
|
||||
clocksource.verify_n_cpus= [KNL]
|
||||
Limit the number of CPUs checked for clocksources
|
||||
|
|
@ -3397,7 +3397,7 @@
|
|||
Disable SMAP (Supervisor Mode Access Prevention)
|
||||
even if it is supported by processor.
|
||||
|
||||
nosmep [X86,PPC]
|
||||
nosmep [X86,PPC64s]
|
||||
Disable SMEP (Supervisor Mode Execution Prevention)
|
||||
even if it is supported by processor.
|
||||
|
||||
|
|
@ -4170,6 +4170,14 @@
|
|||
Override pmtimer IOPort with a hex value.
|
||||
e.g. pmtmr=0x508
|
||||
|
||||
pmu_override= [PPC] Override the PMU.
|
||||
This option takes over the PMU facility, so it is no
|
||||
longer usable by perf. Setting this option starts the
|
||||
PMU counters by setting MMCR0 to 0 (the FC bit is
|
||||
cleared). If a number is given, then MMCR1 is set to
|
||||
that number, otherwise (e.g., 'pmu_override=on'), MMCR1
|
||||
remains 0.
|
||||
|
||||
pm_debug_messages [SUSPEND,KNL]
|
||||
Enable suspend/resume debug messages during boot up.
|
||||
|
||||
|
|
@ -6498,6 +6506,12 @@
|
|||
controller on both pseries and powernv
|
||||
platforms. Only useful on POWER9 and above.
|
||||
|
||||
xive.store-eoi=off [PPC]
|
||||
By default on POWER10 and above, the kernel will use
|
||||
stores for EOI handling when the XIVE interrupt mode
|
||||
is active. This option allows the XIVE driver to use
|
||||
loads instead, as on POWER9.
|
||||
|
||||
xhci-hcd.quirks [USB,KNL]
|
||||
A hex value specifying bitmask with supplemental xhci
|
||||
host controller quirks. Meaning of each bit can be
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ API to implement a new FPGA bridge
|
|||
|
||||
* struct fpga_bridge - The FPGA Bridge structure
|
||||
* struct fpga_bridge_ops - Low level Bridge driver ops
|
||||
* devm_fpga_bridge_create() - Allocate and init a bridge struct
|
||||
* fpga_bridge_register() - Register a bridge
|
||||
* fpga_bridge_register() - Create and register a bridge
|
||||
* fpga_bridge_unregister() - Unregister a bridge
|
||||
|
||||
.. kernel-doc:: include/linux/fpga/fpga-bridge.h
|
||||
|
|
@ -16,9 +15,6 @@ API to implement a new FPGA bridge
|
|||
.. kernel-doc:: include/linux/fpga/fpga-bridge.h
|
||||
:functions: fpga_bridge_ops
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-bridge.c
|
||||
:functions: devm_fpga_bridge_create
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-bridge.c
|
||||
:functions: fpga_bridge_register
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ How to support a new FPGA device
|
|||
--------------------------------
|
||||
|
||||
To add another FPGA manager, write a driver that implements a set of ops. The
|
||||
probe function calls fpga_mgr_register(), such as::
|
||||
probe function calls fpga_mgr_register() or fpga_mgr_register_full(), such as::
|
||||
|
||||
static const struct fpga_manager_ops socfpga_fpga_ops = {
|
||||
.write_init = socfpga_fpga_ops_configure_init,
|
||||
|
|
@ -49,14 +49,14 @@ probe function calls fpga_mgr_register(), such as::
|
|||
* them in priv
|
||||
*/
|
||||
|
||||
mgr = devm_fpga_mgr_create(dev, "Altera SOCFPGA FPGA Manager",
|
||||
&socfpga_fpga_ops, priv);
|
||||
if (!mgr)
|
||||
return -ENOMEM;
|
||||
mgr = fpga_mgr_register(dev, "Altera SOCFPGA FPGA Manager",
|
||||
&socfpga_fpga_ops, priv);
|
||||
if (IS_ERR(mgr))
|
||||
return PTR_ERR(mgr);
|
||||
|
||||
platform_set_drvdata(pdev, mgr);
|
||||
|
||||
return fpga_mgr_register(mgr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int socfpga_fpga_remove(struct platform_device *pdev)
|
||||
|
|
@ -68,6 +68,11 @@ probe function calls fpga_mgr_register(), such as::
|
|||
return 0;
|
||||
}
|
||||
|
||||
Alternatively, the probe function could call one of the resource managed
|
||||
register functions, devm_fpga_mgr_register() or devm_fpga_mgr_register_full().
|
||||
When these functions are used, the parameter syntax is the same, but the call
|
||||
to fpga_mgr_unregister() should be removed. In the above example, the
|
||||
socfpga_fpga_remove() function would not be required.
|
||||
|
||||
The ops will implement whatever device specific register writes are needed to
|
||||
do the programming sequence for this particular FPGA. These ops return 0 for
|
||||
|
|
@ -104,8 +109,14 @@ API for implementing a new FPGA Manager driver
|
|||
* ``fpga_mgr_states`` - Values for :c:expr:`fpga_manager->state`.
|
||||
* struct fpga_manager - the FPGA manager struct
|
||||
* struct fpga_manager_ops - Low level FPGA manager driver ops
|
||||
* devm_fpga_mgr_create() - Allocate and init a manager struct
|
||||
* fpga_mgr_register() - Register an FPGA manager
|
||||
* struct fpga_manager_info - Parameter structure for fpga_mgr_register_full()
|
||||
* fpga_mgr_register_full() - Create and register an FPGA manager using the
|
||||
fpga_mgr_info structure to provide the full flexibility of options
|
||||
* fpga_mgr_register() - Create and register an FPGA manager using standard
|
||||
arguments
|
||||
* devm_fpga_mgr_register_full() - Resource managed version of
|
||||
fpga_mgr_register_full()
|
||||
* devm_fpga_mgr_register() - Resource managed version of fpga_mgr_register()
|
||||
* fpga_mgr_unregister() - Unregister an FPGA manager
|
||||
|
||||
.. kernel-doc:: include/linux/fpga/fpga-mgr.h
|
||||
|
|
@ -117,11 +128,20 @@ API for implementing a new FPGA Manager driver
|
|||
.. kernel-doc:: include/linux/fpga/fpga-mgr.h
|
||||
:functions: fpga_manager_ops
|
||||
|
||||
.. kernel-doc:: include/linux/fpga/fpga-mgr.h
|
||||
:functions: fpga_manager_info
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-mgr.c
|
||||
:functions: devm_fpga_mgr_create
|
||||
:functions: fpga_mgr_register_full
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-mgr.c
|
||||
:functions: fpga_mgr_register
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-mgr.c
|
||||
:functions: devm_fpga_mgr_register_full
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-mgr.c
|
||||
:functions: devm_fpga_mgr_register
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-mgr.c
|
||||
:functions: fpga_mgr_unregister
|
||||
|
|
|
|||
|
|
@ -46,8 +46,11 @@ API to add a new FPGA region
|
|||
----------------------------
|
||||
|
||||
* struct fpga_region - The FPGA region struct
|
||||
* devm_fpga_region_create() - Allocate and init a region struct
|
||||
* fpga_region_register() - Register an FPGA region
|
||||
* struct fpga_region_info - Parameter structure for fpga_region_register_full()
|
||||
* fpga_region_register_full() - Create and register an FPGA region using the
|
||||
fpga_region_info structure to provide the full flexibility of options
|
||||
* fpga_region_register() - Create and register an FPGA region using standard
|
||||
arguments
|
||||
* fpga_region_unregister() - Unregister an FPGA region
|
||||
|
||||
The FPGA region's probe function will need to get a reference to the FPGA
|
||||
|
|
@ -75,8 +78,11 @@ following APIs to handle building or tearing down that list.
|
|||
.. kernel-doc:: include/linux/fpga/fpga-region.h
|
||||
:functions: fpga_region
|
||||
|
||||
.. kernel-doc:: include/linux/fpga/fpga-region.h
|
||||
:functions: fpga_region_info
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-region.c
|
||||
:functions: devm_fpga_region_create
|
||||
:functions: fpga_region_register_full
|
||||
|
||||
.. kernel-doc:: drivers/fpga/fpga-region.c
|
||||
:functions: fpga_region_register
|
||||
|
|
|
|||
|
|
@ -262,11 +262,11 @@ order to communicate with the device: to read and write various Signals
|
|||
and Counts, and to set and get the "action mode" and "function mode" for
|
||||
various Synapses and Counts respectively.
|
||||
|
||||
A defined counter_device structure may be registered to the system by
|
||||
passing it to the counter_register function, and unregistered by passing
|
||||
it to the counter_unregister function. Similarly, the
|
||||
devm_counter_register function may be used if device memory-managed
|
||||
registration is desired.
|
||||
A counter_device structure is allocated using counter_alloc() and then
|
||||
registered to the system by passing it to the counter_add() function, and
|
||||
unregistered by passing it to the counter_unregister function. There are
|
||||
device managed variants of these functions: devm_counter_alloc() and
|
||||
devm_counter_add().
|
||||
|
||||
The struct counter_comp structure is used to define counter extensions
|
||||
for Signals, Synapses, and Counts.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ PCI Support Library
|
|||
.. kernel-doc:: drivers/pci/search.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: drivers/pci/msi.c
|
||||
.. kernel-doc:: drivers/pci/msi/msi.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: drivers/pci/bus.c
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,8 +1,8 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
===============================================
|
||||
CacheFiles: CACHE ON ALREADY MOUNTED FILESYSTEM
|
||||
===============================================
|
||||
===================================
|
||||
Cache on Already Mounted Filesystem
|
||||
===================================
|
||||
|
||||
.. Contents:
|
||||
|
||||
|
|
|
|||
|
|
@ -10,25 +10,25 @@ Overview
|
|||
This facility is a general purpose cache for network filesystems, though it
|
||||
could be used for caching other things such as ISO9660 filesystems too.
|
||||
|
||||
FS-Cache mediates between cache backends (such as CacheFS) and network
|
||||
FS-Cache mediates between cache backends (such as CacheFiles) and network
|
||||
filesystems::
|
||||
|
||||
+---------+
|
||||
| | +--------------+
|
||||
| NFS |--+ | |
|
||||
| | | +-->| CacheFS |
|
||||
+---------+ | +----------+ | | /dev/hda5 |
|
||||
| | | | +--------------+
|
||||
+---------+ +-->| | |
|
||||
| | | |--+
|
||||
| AFS |----->| FS-Cache |
|
||||
| | | |--+
|
||||
+---------+ +-->| | |
|
||||
| | | | +--------------+
|
||||
+---------+ | +----------+ | | |
|
||||
| | | +-->| CacheFiles |
|
||||
| ISOFS |--+ | /var/cache |
|
||||
| | +--------------+
|
||||
| | +--------------+
|
||||
| NFS |--+ | |
|
||||
| | | +-->| CacheFS |
|
||||
+---------+ | +----------+ | | /dev/hda5 |
|
||||
| | | | +--------------+
|
||||
+---------+ +-------------->| | |
|
||||
| | +-------+ | |--+
|
||||
| AFS |----->| | | FS-Cache |
|
||||
| | | netfs |-->| |--+
|
||||
+---------+ +-->| lib | | | |
|
||||
| | | | | | +--------------+
|
||||
+---------+ | +-------+ +----------+ | | |
|
||||
| | | +-->| CacheFiles |
|
||||
| 9P |--+ | /var/cache |
|
||||
| | +--------------+
|
||||
+---------+
|
||||
|
||||
Or to look at it another way, FS-Cache is a module that provides a caching
|
||||
|
|
@ -84,101 +84,62 @@ then serving the pages out of that cache rather than the netfs inode because:
|
|||
one-off access of a small portion of it (such as might be done with the
|
||||
"file" program).
|
||||
|
||||
It instead serves the cache out in PAGE_SIZE chunks as and when requested by
|
||||
the netfs('s) using it.
|
||||
It instead serves the cache out in chunks as and when requested by the netfs
|
||||
using it.
|
||||
|
||||
|
||||
FS-Cache provides the following facilities:
|
||||
|
||||
(1) More than one cache can be used at once. Caches can be selected
|
||||
* More than one cache can be used at once. Caches can be selected
|
||||
explicitly by use of tags.
|
||||
|
||||
(2) Caches can be added / removed at any time.
|
||||
* Caches can be added / removed at any time, even whilst being accessed.
|
||||
|
||||
(3) The netfs is provided with an interface that allows either party to
|
||||
* The netfs is provided with an interface that allows either party to
|
||||
withdraw caching facilities from a file (required for (2)).
|
||||
|
||||
(4) The interface to the netfs returns as few errors as possible, preferring
|
||||
* The interface to the netfs returns as few errors as possible, preferring
|
||||
rather to let the netfs remain oblivious.
|
||||
|
||||
(5) Cookies are used to represent indices, files and other objects to the
|
||||
netfs. The simplest cookie is just a NULL pointer - indicating nothing
|
||||
cached there.
|
||||
* There are three types of cookie: cache, volume and data file cookies.
|
||||
Cache cookies represent the cache as a whole and are not normally visible
|
||||
to the netfs; the netfs gets a volume cookie to represent a collection of
|
||||
files (typically something that a netfs would get for a superblock); and
|
||||
data file cookies are used to cache data (something that would be got for
|
||||
an inode).
|
||||
|
||||
(6) The netfs is allowed to propose - dynamically - any index hierarchy it
|
||||
desires, though it must be aware that the index search function is
|
||||
recursive, stack space is limited, and indices can only be children of
|
||||
indices.
|
||||
* Volumes are matched using a key. This is a printable string that is used
|
||||
to encode all the information that might be needed to distinguish one
|
||||
superblock, say, from another. This would be a compound of things like
|
||||
cell name or server address, volume name or share path. It must be a
|
||||
valid pathname.
|
||||
|
||||
(7) Data I/O is done direct to and from the netfs's pages. The netfs
|
||||
indicates that page A is at index B of the data-file represented by cookie
|
||||
C, and that it should be read or written. The cache backend may or may
|
||||
not start I/O on that page, but if it does, a netfs callback will be
|
||||
invoked to indicate completion. The I/O may be either synchronous or
|
||||
asynchronous.
|
||||
* Cookies are matched using a key. This is a binary blob and is used to
|
||||
represent the object within a volume (so the volume key need not form
|
||||
part of the blob). This might include things like an inode number and
|
||||
uniquifier or a file handle.
|
||||
|
||||
(8) Cookies can be "retired" upon release. At this point FS-Cache will mark
|
||||
them as obsolete and the index hierarchy rooted at that point will get
|
||||
recycled.
|
||||
* Cookie resources are set up and pinned by marking the cookie in-use.
|
||||
This prevents the backing resources from being culled. Timed garbage
|
||||
collection is employed to eliminate cookies that haven't been used for a
|
||||
short while, thereby reducing resource overload. This is intended to be
|
||||
used when a file is opened or closed.
|
||||
|
||||
(9) The netfs provides a "match" function for index searches. In addition to
|
||||
saying whether a match was made or not, this can also specify that an
|
||||
entry should be updated or deleted.
|
||||
A cookie can be marked in-use multiple times simultaneously; each mark
|
||||
must be unused.
|
||||
|
||||
(10) As much as possible is done asynchronously.
|
||||
* Begin/end access functions are provided to delay cache withdrawal for the
|
||||
duration of an operation and prevent structs from being freed whilst
|
||||
we're looking at them.
|
||||
|
||||
* Data I/O is done by asynchronous DIO to/from a buffer described by the
|
||||
netfs using an iov_iter.
|
||||
|
||||
FS-Cache maintains a virtual indexing tree in which all indices, files, objects
|
||||
and pages are kept. Bits of this tree may actually reside in one or more
|
||||
caches::
|
||||
* An invalidation facility is available to discard data from the cache and
|
||||
to deal with I/O that's in progress that is accessing old data.
|
||||
|
||||
FSDEF
|
||||
|
|
||||
+------------------------------------+
|
||||
| |
|
||||
NFS AFS
|
||||
| |
|
||||
+--------------------------+ +-----------+
|
||||
| | | |
|
||||
homedir mirror afs.org redhat.com
|
||||
| | |
|
||||
+------------+ +---------------+ +----------+
|
||||
| | | | | |
|
||||
00001 00002 00007 00125 vol00001 vol00002
|
||||
| | | | |
|
||||
+---+---+ +-----+ +---+ +------+------+ +-----+----+
|
||||
| | | | | | | | | | | | |
|
||||
PG0 PG1 PG2 PG0 XATTR PG0 PG1 DIRENT DIRENT DIRENT R/W R/O Bak
|
||||
| |
|
||||
PG0 +-------+
|
||||
| |
|
||||
00001 00003
|
||||
|
|
||||
+---+---+
|
||||
| | |
|
||||
PG0 PG1 PG2
|
||||
|
||||
In the example above, you can see two netfs's being backed: NFS and AFS. These
|
||||
have different index hierarchies:
|
||||
|
||||
* The NFS primary index contains per-server indices. Each server index is
|
||||
indexed by NFS file handles to get data file objects. Each data file
|
||||
objects can have an array of pages, but may also have further child
|
||||
objects, such as extended attributes and directory entries. Extended
|
||||
attribute objects themselves have page-array contents.
|
||||
|
||||
* The AFS primary index contains per-cell indices. Each cell index contains
|
||||
per-logical-volume indices. Each of volume index contains up to three
|
||||
indices for the read-write, read-only and backup mirrors of those volumes.
|
||||
Each of these contains vnode data file objects, each of which contains an
|
||||
array of pages.
|
||||
|
||||
The very top index is the FS-Cache master index in which individual netfs's
|
||||
have entries.
|
||||
|
||||
Any index object may reside in more than one cache, provided it only has index
|
||||
children. Any index with non-index object children will be assumed to only
|
||||
reside in one cache.
|
||||
* Cookies can be "retired" upon release, thereby causing the object to be
|
||||
removed from the cache.
|
||||
|
||||
|
||||
The netfs API to FS-Cache can be found in:
|
||||
|
|
@ -189,11 +150,6 @@ The cache backend API to FS-Cache can be found in:
|
|||
|
||||
Documentation/filesystems/caching/backend-api.rst
|
||||
|
||||
A description of the internal representations and object state machine can be
|
||||
found in:
|
||||
|
||||
Documentation/filesystems/caching/object.rst
|
||||
|
||||
|
||||
Statistical Information
|
||||
=======================
|
||||
|
|
@ -201,333 +157,162 @@ Statistical Information
|
|||
If FS-Cache is compiled with the following options enabled::
|
||||
|
||||
CONFIG_FSCACHE_STATS=y
|
||||
CONFIG_FSCACHE_HISTOGRAM=y
|
||||
|
||||
then it will gather certain statistics and display them through a number of
|
||||
proc files.
|
||||
then it will gather certain statistics and display them through:
|
||||
|
||||
/proc/fs/fscache/stats
|
||||
----------------------
|
||||
/proc/fs/fscache/stats
|
||||
|
||||
This shows counts of a number of events that can happen in FS-Cache:
|
||||
This shows counts of a number of events that can happen in FS-Cache:
|
||||
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|CLASS |EVENT |MEANING |
|
||||
+==============+=======+=======================================================+
|
||||
|Cookies |idx=N |Number of index cookies allocated |
|
||||
|Cookies |n=N |Number of data storage cookies allocated |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |dat=N |Number of data storage cookies allocated |
|
||||
| |v=N |Number of volume index cookies allocated |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |spc=N |Number of special cookies allocated |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Objects |alc=N |Number of objects allocated |
|
||||
| |vcol=N |Number of volume index key collisions |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |nal=N |Number of object allocation failures |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |avl=N |Number of objects that reached the available state |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ded=N |Number of objects that reached the dead state |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|ChkAux |non=N |Number of objects that didn't have a coherency check |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ok=N |Number of objects that passed a coherency check |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |upd=N |Number of objects that needed a coherency data update |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |obs=N |Number of objects that were declared obsolete |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Pages |mrk=N |Number of pages marked as being cached |
|
||||
| |unc=N |Number of uncache page requests seen |
|
||||
| |voom=N |Number of OOM events when allocating volume cookies |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Acquire |n=N |Number of acquire cookie requests seen |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |nul=N |Number of acq reqs given a NULL parent |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |noc=N |Number of acq reqs rejected due to no cache available |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ok=N |Number of acq reqs succeeded |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |nbf=N |Number of acq reqs rejected due to error |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |oom=N |Number of acq reqs failed on ENOMEM |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Lookups |n=N |Number of lookup calls made on cache backends |
|
||||
|LRU |n=N |Number of cookies currently on the LRU |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |neg=N |Number of negative lookups made |
|
||||
| |exp=N |Number of cookies expired off of the LRU |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |pos=N |Number of positive lookups made |
|
||||
| |rmv=N |Number of cookies removed from the LRU |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |crt=N |Number of objects created by lookup |
|
||||
| |drp=N |Number of LRU'd cookies relinquished/withdrawn |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |tmo=N |Number of lookups timed out and requeued |
|
||||
| |at=N |Time till next LRU cull (jiffies) |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Invals |n=N |Number of invalidations |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Updates |n=N |Number of update cookie requests seen |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |nul=N |Number of upd reqs given a NULL parent |
|
||||
| |rsz=N |Number of resize requests |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |run=N |Number of upd reqs granted CPU time |
|
||||
| |rsn=N |Number of skipped resize requests |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Relinqs |n=N |Number of relinquish cookie requests seen |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |nul=N |Number of rlq reqs given a NULL parent |
|
||||
| |rtr=N |Number of rlq reqs with retire=true |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |wcr=N |Number of rlq reqs waited on completion of creation |
|
||||
| |drop=N |Number of cookies no longer blocking re-acquisition |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|AttrChg |n=N |Number of attribute changed requests seen |
|
||||
|NoSpace |nwr=N |Number of write requests refused due to lack of space |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ok=N |Number of attr changed requests queued |
|
||||
| |ncr=N |Number of create requests refused due to lack of space |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |nbf=N |Number of attr changed rejected -ENOBUFS |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |oom=N |Number of attr changed failed -ENOMEM |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |run=N |Number of attr changed ops given CPU time |
|
||||
| |cull=N |Number of objects culled to make space |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Allocs |n=N |Number of allocation requests seen |
|
||||
|IO |rd=N |Number of read operations in the cache |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ok=N |Number of successful alloc reqs |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |wt=N |Number of alloc reqs that waited on lookup completion |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |nbf=N |Number of alloc reqs rejected -ENOBUFS |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |int=N |Number of alloc reqs aborted -ERESTARTSYS |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ops=N |Number of alloc reqs submitted |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |owt=N |Number of alloc reqs waited for CPU time |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |abt=N |Number of alloc reqs aborted due to object death |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Retrvls |n=N |Number of retrieval (read) requests seen |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ok=N |Number of successful retr reqs |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |wt=N |Number of retr reqs that waited on lookup completion |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |nod=N |Number of retr reqs returned -ENODATA |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |nbf=N |Number of retr reqs rejected -ENOBUFS |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |int=N |Number of retr reqs aborted -ERESTARTSYS |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |oom=N |Number of retr reqs failed -ENOMEM |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ops=N |Number of retr reqs submitted |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |owt=N |Number of retr reqs waited for CPU time |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |abt=N |Number of retr reqs aborted due to object death |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Stores |n=N |Number of storage (write) requests seen |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ok=N |Number of successful store reqs |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |agn=N |Number of store reqs on a page already pending storage |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |nbf=N |Number of store reqs rejected -ENOBUFS |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |oom=N |Number of store reqs failed -ENOMEM |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ops=N |Number of store reqs submitted |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |run=N |Number of store reqs granted CPU time |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |pgs=N |Number of pages given store req processing time |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |rxd=N |Number of store reqs deleted from tracking tree |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |olm=N |Number of store reqs over store limit |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|VmScan |nos=N |Number of release reqs against pages with no |
|
||||
| | |pending store |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |gon=N |Number of release reqs against pages stored by |
|
||||
| | |time lock granted |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |bsy=N |Number of release reqs ignored due to in-progress store|
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |can=N |Number of page stores cancelled due to release req |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|Ops |pend=N |Number of times async ops added to pending queues |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |run=N |Number of times async ops given CPU time |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |enq=N |Number of times async ops queued for processing |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |can=N |Number of async ops cancelled |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |rej=N |Number of async ops rejected due to object |
|
||||
| | |lookup/create failure |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ini=N |Number of async ops initialised |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |dfr=N |Number of async ops queued for deferred release |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |rel=N |Number of async ops released |
|
||||
| | |(should equal ini=N when idle) |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |gc=N |Number of deferred-release async ops garbage collected |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|CacheOp |alo=N |Number of in-progress alloc_object() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |luo=N |Number of in-progress lookup_object() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |luc=N |Number of in-progress lookup_complete() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |gro=N |Number of in-progress grab_object() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |upo=N |Number of in-progress update_object() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |dro=N |Number of in-progress drop_object() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |pto=N |Number of in-progress put_object() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |syn=N |Number of in-progress sync_cache() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |atc=N |Number of in-progress attr_changed() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |rap=N |Number of in-progress read_or_alloc_page() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ras=N |Number of in-progress read_or_alloc_pages() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |alp=N |Number of in-progress allocate_page() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |als=N |Number of in-progress allocate_pages() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |wrp=N |Number of in-progress write_page() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |ucp=N |Number of in-progress uncache_page() cache ops |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |dsp=N |Number of in-progress dissociate_pages() cache ops |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|CacheEv |nsp=N |Number of object lookups/creations rejected due to |
|
||||
| | |lack of space |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |stl=N |Number of stale objects deleted |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |rtr=N |Number of objects retired when relinquished |
|
||||
+ +-------+-------------------------------------------------------+
|
||||
| |cul=N |Number of objects culled |
|
||||
| |wr=N |Number of write operations in the cache |
|
||||
+--------------+-------+-------------------------------------------------------+
|
||||
|
||||
Netfslib will also add some stats counters of its own.
|
||||
|
||||
|
||||
/proc/fs/fscache/histogram
|
||||
--------------------------
|
||||
Cache List
|
||||
==========
|
||||
|
||||
::
|
||||
FS-Cache provides a list of cache cookies:
|
||||
|
||||
cat /proc/fs/fscache/histogram
|
||||
JIFS SECS OBJ INST OP RUNS OBJ RUNS RETRV DLY RETRIEVLS
|
||||
===== ===== ========= ========= ========= ========= =========
|
||||
|
||||
This shows the breakdown of the number of times each amount of time
|
||||
between 0 jiffies and HZ-1 jiffies a variety of tasks took to run. The
|
||||
columns are as follows:
|
||||
|
||||
========= =======================================================
|
||||
COLUMN TIME MEASUREMENT
|
||||
========= =======================================================
|
||||
OBJ INST Length of time to instantiate an object
|
||||
OP RUNS Length of time a call to process an operation took
|
||||
OBJ RUNS Length of time a call to process an object event took
|
||||
RETRV DLY Time between an requesting a read and lookup completing
|
||||
RETRIEVLS Time between beginning and end of a retrieval
|
||||
========= =======================================================
|
||||
|
||||
Each row shows the number of events that took a particular range of times.
|
||||
Each step is 1 jiffy in size. The JIFS column indicates the particular
|
||||
jiffy range covered, and the SECS field the equivalent number of seconds.
|
||||
|
||||
|
||||
|
||||
Object List
|
||||
===========
|
||||
|
||||
If CONFIG_FSCACHE_OBJECT_LIST is enabled, the FS-Cache facility will maintain a
|
||||
list of all the objects currently allocated and allow them to be viewed
|
||||
through::
|
||||
|
||||
/proc/fs/fscache/objects
|
||||
/proc/fs/fscache/cookies
|
||||
|
||||
This will look something like::
|
||||
|
||||
[root@andromeda ~]# head /proc/fs/fscache/objects
|
||||
OBJECT PARENT STAT CHLDN OPS OOP IPR EX READS EM EV F S | NETFS_COOKIE_DEF TY FL NETFS_DATA OBJECT_KEY, AUX_DATA
|
||||
======== ======== ==== ===== === === === == ===== == == = = | ================ == == ================ ================
|
||||
17e4b 2 ACTV 0 0 0 0 0 0 7b 4 0 0 | NFS.fh DT 0 ffff88001dd82820 010006017edcf8bbc93b43298fdfbe71e50b57b13a172c0117f38472, e567634700000000000000000000000063f2404a000000000000000000000000c9030000000000000000000063f2404a
|
||||
1693a 2 ACTV 0 0 0 0 0 0 7b 4 0 0 | NFS.fh DT 0 ffff88002db23380 010006017edcf8bbc93b43298fdfbe71e50b57b1e0162c01a2df0ea6, 420ebc4a000000000000000000000000420ebc4a0000000000000000000000000e1801000000000000000000420ebc4a
|
||||
# cat /proc/fs/fscache/caches
|
||||
CACHE REF VOLS OBJS ACCES S NAME
|
||||
======== ===== ===== ===== ===== = ===============
|
||||
00000001 2 1 2123 1 A default
|
||||
|
||||
where the first set of columns before the '|' describe the object:
|
||||
where the columns are:
|
||||
|
||||
======= ===============================================================
|
||||
COLUMN DESCRIPTION
|
||||
======= ===============================================================
|
||||
OBJECT Object debugging ID (appears as OBJ%x in some debug messages)
|
||||
PARENT Debugging ID of parent object
|
||||
STAT Object state
|
||||
CHLDN Number of child objects of this object
|
||||
OPS Number of outstanding operations on this object
|
||||
OOP Number of outstanding child object management operations
|
||||
IPR
|
||||
EX Number of outstanding exclusive operations
|
||||
READS Number of outstanding read operations
|
||||
EM Object's event mask
|
||||
EV Events raised on this object
|
||||
F Object flags
|
||||
S Object work item busy state mask (1:pending 2:running)
|
||||
CACHE Cache cookie debug ID (also appears in traces)
|
||||
REF Number of references on the cache cookie
|
||||
VOLS Number of volumes cookies in this cache
|
||||
OBJS Number of cache objects in use
|
||||
ACCES Number of accesses pinning the cache
|
||||
S State
|
||||
NAME Name of the cache.
|
||||
======= ===============================================================
|
||||
|
||||
and the second set of columns describe the object's cookie, if present:
|
||||
The state can be (-) Inactive, (P)reparing, (A)ctive, (E)rror or (W)ithdrawing.
|
||||
|
||||
================ ======================================================
|
||||
COLUMN DESCRIPTION
|
||||
================ ======================================================
|
||||
NETFS_COOKIE_DEF Name of netfs cookie definition
|
||||
TY Cookie type (IX - index, DT - data, hex - special)
|
||||
FL Cookie flags
|
||||
NETFS_DATA Netfs private data stored in the cookie
|
||||
OBJECT_KEY Object key } 1 column, with separating comma
|
||||
AUX_DATA Object aux data } presence may be configured
|
||||
================ ======================================================
|
||||
|
||||
The data shown may be filtered by attaching the a key to an appropriate keyring
|
||||
before viewing the file. Something like::
|
||||
Volume List
|
||||
===========
|
||||
|
||||
keyctl add user fscache:objlist <restrictions> @s
|
||||
FS-Cache provides a list of volume cookies:
|
||||
|
||||
where <restrictions> are a selection of the following letters:
|
||||
/proc/fs/fscache/volumes
|
||||
|
||||
== =========================================================
|
||||
K Show hexdump of object key (don't show if not given)
|
||||
A Show hexdump of object aux data (don't show if not given)
|
||||
== =========================================================
|
||||
This will look something like::
|
||||
|
||||
and the following paired letters:
|
||||
VOLUME REF nCOOK ACC FL CACHE KEY
|
||||
======== ===== ===== === == =============== ================
|
||||
00000001 55 54 1 00 default afs,example.com,100058
|
||||
|
||||
== =========================================================
|
||||
C Show objects that have a cookie
|
||||
c Show objects that don't have a cookie
|
||||
B Show objects that are busy
|
||||
b Show objects that aren't busy
|
||||
W Show objects that have pending writes
|
||||
w Show objects that don't have pending writes
|
||||
R Show objects that have outstanding reads
|
||||
r Show objects that don't have outstanding reads
|
||||
S Show objects that have work queued
|
||||
s Show objects that don't have work queued
|
||||
== =========================================================
|
||||
where the columns are:
|
||||
|
||||
If neither side of a letter pair is given, then both are implied. For example:
|
||||
======= ===============================================================
|
||||
COLUMN DESCRIPTION
|
||||
======= ===============================================================
|
||||
VOLUME The volume cookie debug ID (also appears in traces)
|
||||
REF Number of references on the volume cookie
|
||||
nCOOK Number of cookies in the volume
|
||||
ACC Number of accesses pinning the cache
|
||||
FL Flags on the volume cookie
|
||||
CACHE Name of the cache or "-"
|
||||
KEY The indexing key for the volume
|
||||
======= ===============================================================
|
||||
|
||||
keyctl add user fscache:objlist KB @s
|
||||
|
||||
shows objects that are busy, and lists their object keys, but does not dump
|
||||
their auxiliary data. It also implies "CcWwRrSs", but as 'B' is given, 'b' is
|
||||
not implied.
|
||||
Cookie List
|
||||
===========
|
||||
|
||||
By default all objects and all fields will be shown.
|
||||
FS-Cache provides a list of cookies:
|
||||
|
||||
/proc/fs/fscache/cookies
|
||||
|
||||
This will look something like::
|
||||
|
||||
# head /proc/fs/fscache/cookies
|
||||
COOKIE VOLUME REF ACT ACC S FL DEF
|
||||
======== ======== === === === = == ================
|
||||
00000435 00000001 1 0 -1 - 08 0000000201d080070000000000000000, 0000000000000000
|
||||
00000436 00000001 1 0 -1 - 00 0000005601d080080000000000000000, 0000000000000051
|
||||
00000437 00000001 1 0 -1 - 08 00023b3001d0823f0000000000000000, 0000000000000000
|
||||
00000438 00000001 1 0 -1 - 08 0000005801d0807b0000000000000000, 0000000000000000
|
||||
00000439 00000001 1 0 -1 - 08 00023b3201d080a10000000000000000, 0000000000000000
|
||||
0000043a 00000001 1 0 -1 - 08 00023b3401d080a30000000000000000, 0000000000000000
|
||||
0000043b 00000001 1 0 -1 - 08 00023b3601d080b30000000000000000, 0000000000000000
|
||||
0000043c 00000001 1 0 -1 - 08 00023b3801d080b40000000000000000, 0000000000000000
|
||||
|
||||
where the columns are:
|
||||
|
||||
======= ===============================================================
|
||||
COLUMN DESCRIPTION
|
||||
======= ===============================================================
|
||||
COOKIE The cookie debug ID (also appears in traces)
|
||||
VOLUME The parent volume cookie debug ID
|
||||
REF Number of references on the volume cookie
|
||||
ACT Number of times the cookie is marked for in use
|
||||
ACC Number of access pins in the cookie
|
||||
S State of the cookie
|
||||
FL Flags on the cookie
|
||||
DEF Key, auxiliary data
|
||||
======= ===============================================================
|
||||
|
||||
|
||||
Debugging
|
||||
|
|
@ -549,10 +334,8 @@ This is a bitmask of debugging streams to enable:
|
|||
3 8 Cookie management Function entry trace
|
||||
4 16 Function exit trace
|
||||
5 32 General
|
||||
6 64 Page handling Function entry trace
|
||||
7 128 Function exit trace
|
||||
8 256 General
|
||||
9 512 Operation management Function entry trace
|
||||
6-8 (Not used)
|
||||
9 512 I/O operation management Function entry trace
|
||||
10 1024 Function exit trace
|
||||
11 2048 General
|
||||
======= ======= =============================== =======================
|
||||
|
|
@ -560,6 +343,6 @@ This is a bitmask of debugging streams to enable:
|
|||
The appropriate set of values should be OR'd together and the result written to
|
||||
the control file. For example::
|
||||
|
||||
echo $((1|8|64)) >/sys/module/fscache/parameters/debug
|
||||
echo $((1|8|512)) >/sys/module/fscache/parameters/debug
|
||||
|
||||
will turn on all function entry debugging.
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ Filesystem Caching
|
|||
:maxdepth: 2
|
||||
|
||||
fscache
|
||||
object
|
||||
netfs-api
|
||||
backend-api
|
||||
cachefiles
|
||||
netfs-api
|
||||
operations
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,313 +0,0 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
====================================================
|
||||
In-Kernel Cache Object Representation and Management
|
||||
====================================================
|
||||
|
||||
By: David Howells <dhowells@redhat.com>
|
||||
|
||||
.. Contents:
|
||||
|
||||
(*) Representation
|
||||
|
||||
(*) Object management state machine.
|
||||
|
||||
- Provision of cpu time.
|
||||
- Locking simplification.
|
||||
|
||||
(*) The set of states.
|
||||
|
||||
(*) The set of events.
|
||||
|
||||
|
||||
Representation
|
||||
==============
|
||||
|
||||
FS-Cache maintains an in-kernel representation of each object that a netfs is
|
||||
currently interested in. Such objects are represented by the fscache_cookie
|
||||
struct and are referred to as cookies.
|
||||
|
||||
FS-Cache also maintains a separate in-kernel representation of the objects that
|
||||
a cache backend is currently actively caching. Such objects are represented by
|
||||
the fscache_object struct. The cache backends allocate these upon request, and
|
||||
are expected to embed them in their own representations. These are referred to
|
||||
as objects.
|
||||
|
||||
There is a 1:N relationship between cookies and objects. A cookie may be
|
||||
represented by multiple objects - an index may exist in more than one cache -
|
||||
or even by no objects (it may not be cached).
|
||||
|
||||
Furthermore, both cookies and objects are hierarchical. The two hierarchies
|
||||
correspond, but the cookies tree is a superset of the union of the object trees
|
||||
of multiple caches::
|
||||
|
||||
NETFS INDEX TREE : CACHE 1 : CACHE 2
|
||||
: :
|
||||
: +-----------+ :
|
||||
+----------->| IObject | :
|
||||
+-----------+ | : +-----------+ :
|
||||
| ICookie |-------+ : | :
|
||||
+-----------+ | : | : +-----------+
|
||||
| +------------------------------>| IObject |
|
||||
| : | : +-----------+
|
||||
| : V : |
|
||||
| : +-----------+ : |
|
||||
V +----------->| IObject | : |
|
||||
+-----------+ | : +-----------+ : |
|
||||
| ICookie |-------+ : | : V
|
||||
+-----------+ | : | : +-----------+
|
||||
| +------------------------------>| IObject |
|
||||
+-----+-----+ : | : +-----------+
|
||||
| | : | : |
|
||||
V | : V : |
|
||||
+-----------+ | : +-----------+ : |
|
||||
| ICookie |------------------------->| IObject | : |
|
||||
+-----------+ | : +-----------+ : |
|
||||
| V : | : V
|
||||
| +-----------+ : | : +-----------+
|
||||
| | ICookie |-------------------------------->| IObject |
|
||||
| +-----------+ : | : +-----------+
|
||||
V | : V : |
|
||||
+-----------+ | : +-----------+ : |
|
||||
| DCookie |------------------------->| DObject | : |
|
||||
+-----------+ | : +-----------+ : |
|
||||
| : : |
|
||||
+-------+-------+ : : |
|
||||
| | : : |
|
||||
V V : : V
|
||||
+-----------+ +-----------+ : : +-----------+
|
||||
| DCookie | | DCookie |------------------------>| DObject |
|
||||
+-----------+ +-----------+ : : +-----------+
|
||||
: :
|
||||
|
||||
In the above illustration, ICookie and IObject represent indices and DCookie
|
||||
and DObject represent data storage objects. Indices may have representation in
|
||||
multiple caches, but currently, non-index objects may not. Objects of any type
|
||||
may also be entirely unrepresented.
|
||||
|
||||
As far as the netfs API goes, the netfs is only actually permitted to see
|
||||
pointers to the cookies. The cookies themselves and any objects attached to
|
||||
those cookies are hidden from it.
|
||||
|
||||
|
||||
Object Management State Machine
|
||||
===============================
|
||||
|
||||
Within FS-Cache, each active object is managed by its own individual state
|
||||
machine. The state for an object is kept in the fscache_object struct, in
|
||||
object->state. A cookie may point to a set of objects that are in different
|
||||
states.
|
||||
|
||||
Each state has an action associated with it that is invoked when the machine
|
||||
wakes up in that state. There are four logical sets of states:
|
||||
|
||||
(1) Preparation: states that wait for the parent objects to become ready. The
|
||||
representations are hierarchical, and it is expected that an object must
|
||||
be created or accessed with respect to its parent object.
|
||||
|
||||
(2) Initialisation: states that perform lookups in the cache and validate
|
||||
what's found and that create on disk any missing metadata.
|
||||
|
||||
(3) Normal running: states that allow netfs operations on objects to proceed
|
||||
and that update the state of objects.
|
||||
|
||||
(4) Termination: states that detach objects from their netfs cookies, that
|
||||
delete objects from disk, that handle disk and system errors and that free
|
||||
up in-memory resources.
|
||||
|
||||
|
||||
In most cases, transitioning between states is in response to signalled events.
|
||||
When a state has finished processing, it will usually set the mask of events in
|
||||
which it is interested (object->event_mask) and relinquish the worker thread.
|
||||
Then when an event is raised (by calling fscache_raise_event()), if the event
|
||||
is not masked, the object will be queued for processing (by calling
|
||||
fscache_enqueue_object()).
|
||||
|
||||
|
||||
Provision of CPU Time
|
||||
---------------------
|
||||
|
||||
The work to be done by the various states was given CPU time by the threads of
|
||||
the slow work facility. This was used in preference to the workqueue facility
|
||||
because:
|
||||
|
||||
(1) Threads may be completely occupied for very long periods of time by a
|
||||
particular work item. These state actions may be doing sequences of
|
||||
synchronous, journalled disk accesses (lookup, mkdir, create, setxattr,
|
||||
getxattr, truncate, unlink, rmdir, rename).
|
||||
|
||||
(2) Threads may do little actual work, but may rather spend a lot of time
|
||||
sleeping on I/O. This means that single-threaded and 1-per-CPU-threaded
|
||||
workqueues don't necessarily have the right numbers of threads.
|
||||
|
||||
|
||||
Locking Simplification
|
||||
----------------------
|
||||
|
||||
Because only one worker thread may be operating on any particular object's
|
||||
state machine at once, this simplifies the locking, particularly with respect
|
||||
to disconnecting the netfs's representation of a cache object (fscache_cookie)
|
||||
from the cache backend's representation (fscache_object) - which may be
|
||||
requested from either end.
|
||||
|
||||
|
||||
The Set of States
|
||||
=================
|
||||
|
||||
The object state machine has a set of states that it can be in. There are
|
||||
preparation states in which the object sets itself up and waits for its parent
|
||||
object to transit to a state that allows access to its children:
|
||||
|
||||
(1) State FSCACHE_OBJECT_INIT.
|
||||
|
||||
Initialise the object and wait for the parent object to become active. In
|
||||
the cache, it is expected that it will not be possible to look an object
|
||||
up from the parent object, until that parent object itself has been looked
|
||||
up.
|
||||
|
||||
There are initialisation states in which the object sets itself up and accesses
|
||||
disk for the object metadata:
|
||||
|
||||
(2) State FSCACHE_OBJECT_LOOKING_UP.
|
||||
|
||||
Look up the object on disk, using the parent as a starting point.
|
||||
FS-Cache expects the cache backend to probe the cache to see whether this
|
||||
object is represented there, and if it is, to see if it's valid (coherency
|
||||
management).
|
||||
|
||||
The cache should call fscache_object_lookup_negative() to indicate lookup
|
||||
failure for whatever reason, and should call fscache_obtained_object() to
|
||||
indicate success.
|
||||
|
||||
At the completion of lookup, FS-Cache will let the netfs go ahead with
|
||||
read operations, no matter whether the file is yet cached. If not yet
|
||||
cached, read operations will be immediately rejected with ENODATA until
|
||||
the first known page is uncached - as to that point there can be no data
|
||||
to be read out of the cache for that file that isn't currently also held
|
||||
in the pagecache.
|
||||
|
||||
(3) State FSCACHE_OBJECT_CREATING.
|
||||
|
||||
Create an object on disk, using the parent as a starting point. This
|
||||
happens if the lookup failed to find the object, or if the object's
|
||||
coherency data indicated what's on disk is out of date. In this state,
|
||||
FS-Cache expects the cache to create
|
||||
|
||||
The cache should call fscache_obtained_object() if creation completes
|
||||
successfully, fscache_object_lookup_negative() otherwise.
|
||||
|
||||
At the completion of creation, FS-Cache will start processing write
|
||||
operations the netfs has queued for an object. If creation failed, the
|
||||
write ops will be transparently discarded, and nothing recorded in the
|
||||
cache.
|
||||
|
||||
There are some normal running states in which the object spends its time
|
||||
servicing netfs requests:
|
||||
|
||||
(4) State FSCACHE_OBJECT_AVAILABLE.
|
||||
|
||||
A transient state in which pending operations are started, child objects
|
||||
are permitted to advance from FSCACHE_OBJECT_INIT state, and temporary
|
||||
lookup data is freed.
|
||||
|
||||
(5) State FSCACHE_OBJECT_ACTIVE.
|
||||
|
||||
The normal running state. In this state, requests the netfs makes will be
|
||||
passed on to the cache.
|
||||
|
||||
(6) State FSCACHE_OBJECT_INVALIDATING.
|
||||
|
||||
The object is undergoing invalidation. When the state comes here, it
|
||||
discards all pending read, write and attribute change operations as it is
|
||||
going to clear out the cache entirely and reinitialise it. It will then
|
||||
continue to the FSCACHE_OBJECT_UPDATING state.
|
||||
|
||||
(7) State FSCACHE_OBJECT_UPDATING.
|
||||
|
||||
The state machine comes here to update the object in the cache from the
|
||||
netfs's records. This involves updating the auxiliary data that is used
|
||||
to maintain coherency.
|
||||
|
||||
And there are terminal states in which an object cleans itself up, deallocates
|
||||
memory and potentially deletes stuff from disk:
|
||||
|
||||
(8) State FSCACHE_OBJECT_LC_DYING.
|
||||
|
||||
The object comes here if it is dying because of a lookup or creation
|
||||
error. This would be due to a disk error or system error of some sort.
|
||||
Temporary data is cleaned up, and the parent is released.
|
||||
|
||||
(9) State FSCACHE_OBJECT_DYING.
|
||||
|
||||
The object comes here if it is dying due to an error, because its parent
|
||||
cookie has been relinquished by the netfs or because the cache is being
|
||||
withdrawn.
|
||||
|
||||
Any child objects waiting on this one are given CPU time so that they too
|
||||
can destroy themselves. This object waits for all its children to go away
|
||||
before advancing to the next state.
|
||||
|
||||
(10) State FSCACHE_OBJECT_ABORT_INIT.
|
||||
|
||||
The object comes to this state if it was waiting on its parent in
|
||||
FSCACHE_OBJECT_INIT, but its parent died. The object will destroy itself
|
||||
so that the parent may proceed from the FSCACHE_OBJECT_DYING state.
|
||||
|
||||
(11) State FSCACHE_OBJECT_RELEASING.
|
||||
(12) State FSCACHE_OBJECT_RECYCLING.
|
||||
|
||||
The object comes to one of these two states when dying once it is rid of
|
||||
all its children, if it is dying because the netfs relinquished its
|
||||
cookie. In the first state, the cached data is expected to persist, and
|
||||
in the second it will be deleted.
|
||||
|
||||
(13) State FSCACHE_OBJECT_WITHDRAWING.
|
||||
|
||||
The object transits to this state if the cache decides it wants to
|
||||
withdraw the object from service, perhaps to make space, but also due to
|
||||
error or just because the whole cache is being withdrawn.
|
||||
|
||||
(14) State FSCACHE_OBJECT_DEAD.
|
||||
|
||||
The object transits to this state when the in-memory object record is
|
||||
ready to be deleted. The object processor shouldn't ever see an object in
|
||||
this state.
|
||||
|
||||
|
||||
The Set of Events
|
||||
-----------------
|
||||
|
||||
There are a number of events that can be raised to an object state machine:
|
||||
|
||||
FSCACHE_OBJECT_EV_UPDATE
|
||||
The netfs requested that an object be updated. The state machine will ask
|
||||
the cache backend to update the object, and the cache backend will ask the
|
||||
netfs for details of the change through its cookie definition ops.
|
||||
|
||||
FSCACHE_OBJECT_EV_CLEARED
|
||||
This is signalled in two circumstances:
|
||||
|
||||
(a) when an object's last child object is dropped and
|
||||
|
||||
(b) when the last operation outstanding on an object is completed.
|
||||
|
||||
This is used to proceed from the dying state.
|
||||
|
||||
FSCACHE_OBJECT_EV_ERROR
|
||||
This is signalled when an I/O error occurs during the processing of some
|
||||
object.
|
||||
|
||||
FSCACHE_OBJECT_EV_RELEASE, FSCACHE_OBJECT_EV_RETIRE
|
||||
These are signalled when the netfs relinquishes a cookie it was using.
|
||||
The event selected depends on whether the netfs asks for the backing
|
||||
object to be retired (deleted) or retained.
|
||||
|
||||
FSCACHE_OBJECT_EV_WITHDRAW
|
||||
This is signalled when the cache backend wants to withdraw an object.
|
||||
This means that the object will have to be detached from the netfs's
|
||||
cookie.
|
||||
|
||||
Because the withdrawing releasing/retiring events are all handled by the object
|
||||
state machine, it doesn't matter if there's a collision with both ends trying
|
||||
to sever the connection at the same time. The state machine can just pick
|
||||
which one it wants to honour, and that effects the other.
|
||||
|
|
@ -1,210 +0,0 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
================================
|
||||
Asynchronous Operations Handling
|
||||
================================
|
||||
|
||||
By: David Howells <dhowells@redhat.com>
|
||||
|
||||
.. Contents:
|
||||
|
||||
(*) Overview.
|
||||
|
||||
(*) Operation record initialisation.
|
||||
|
||||
(*) Parameters.
|
||||
|
||||
(*) Procedure.
|
||||
|
||||
(*) Asynchronous callback.
|
||||
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
FS-Cache has an asynchronous operations handling facility that it uses for its
|
||||
data storage and retrieval routines. Its operations are represented by
|
||||
fscache_operation structs, though these are usually embedded into some other
|
||||
structure.
|
||||
|
||||
This facility is available to and expected to be used by the cache backends,
|
||||
and FS-Cache will create operations and pass them off to the appropriate cache
|
||||
backend for completion.
|
||||
|
||||
To make use of this facility, <linux/fscache-cache.h> should be #included.
|
||||
|
||||
|
||||
Operation Record Initialisation
|
||||
===============================
|
||||
|
||||
An operation is recorded in an fscache_operation struct::
|
||||
|
||||
struct fscache_operation {
|
||||
union {
|
||||
struct work_struct fast_work;
|
||||
struct slow_work slow_work;
|
||||
};
|
||||
unsigned long flags;
|
||||
fscache_operation_processor_t processor;
|
||||
...
|
||||
};
|
||||
|
||||
Someone wanting to issue an operation should allocate something with this
|
||||
struct embedded in it. They should initialise it by calling::
|
||||
|
||||
void fscache_operation_init(struct fscache_operation *op,
|
||||
fscache_operation_release_t release);
|
||||
|
||||
with the operation to be initialised and the release function to use.
|
||||
|
||||
The op->flags parameter should be set to indicate the CPU time provision and
|
||||
the exclusivity (see the Parameters section).
|
||||
|
||||
The op->fast_work, op->slow_work and op->processor flags should be set as
|
||||
appropriate for the CPU time provision (see the Parameters section).
|
||||
|
||||
FSCACHE_OP_WAITING may be set in op->flags prior to each submission of the
|
||||
operation and waited for afterwards.
|
||||
|
||||
|
||||
Parameters
|
||||
==========
|
||||
|
||||
There are a number of parameters that can be set in the operation record's flag
|
||||
parameter. There are three options for the provision of CPU time in these
|
||||
operations:
|
||||
|
||||
(1) The operation may be done synchronously (FSCACHE_OP_MYTHREAD). A thread
|
||||
may decide it wants to handle an operation itself without deferring it to
|
||||
another thread.
|
||||
|
||||
This is, for example, used in read operations for calling readpages() on
|
||||
the backing filesystem in CacheFiles. Although readpages() does an
|
||||
asynchronous data fetch, the determination of whether pages exist is done
|
||||
synchronously - and the netfs does not proceed until this has been
|
||||
determined.
|
||||
|
||||
If this option is to be used, FSCACHE_OP_WAITING must be set in op->flags
|
||||
before submitting the operation, and the operating thread must wait for it
|
||||
to be cleared before proceeding::
|
||||
|
||||
wait_on_bit(&op->flags, FSCACHE_OP_WAITING,
|
||||
TASK_UNINTERRUPTIBLE);
|
||||
|
||||
|
||||
(2) The operation may be fast asynchronous (FSCACHE_OP_FAST), in which case it
|
||||
will be given to keventd to process. Such an operation is not permitted
|
||||
to sleep on I/O.
|
||||
|
||||
This is, for example, used by CacheFiles to copy data from a backing fs
|
||||
page to a netfs page after the backing fs has read the page in.
|
||||
|
||||
If this option is used, op->fast_work and op->processor must be
|
||||
initialised before submitting the operation::
|
||||
|
||||
INIT_WORK(&op->fast_work, do_some_work);
|
||||
|
||||
|
||||
(3) The operation may be slow asynchronous (FSCACHE_OP_SLOW), in which case it
|
||||
will be given to the slow work facility to process. Such an operation is
|
||||
permitted to sleep on I/O.
|
||||
|
||||
This is, for example, used by FS-Cache to handle background writes of
|
||||
pages that have just been fetched from a remote server.
|
||||
|
||||
If this option is used, op->slow_work and op->processor must be
|
||||
initialised before submitting the operation::
|
||||
|
||||
fscache_operation_init_slow(op, processor)
|
||||
|
||||
|
||||
Furthermore, operations may be one of two types:
|
||||
|
||||
(1) Exclusive (FSCACHE_OP_EXCLUSIVE). Operations of this type may not run in
|
||||
conjunction with any other operation on the object being operated upon.
|
||||
|
||||
An example of this is the attribute change operation, in which the file
|
||||
being written to may need truncation.
|
||||
|
||||
(2) Shareable. Operations of this type may be running simultaneously. It's
|
||||
up to the operation implementation to prevent interference between other
|
||||
operations running at the same time.
|
||||
|
||||
|
||||
Procedure
|
||||
=========
|
||||
|
||||
Operations are used through the following procedure:
|
||||
|
||||
(1) The submitting thread must allocate the operation and initialise it
|
||||
itself. Normally this would be part of a more specific structure with the
|
||||
generic op embedded within.
|
||||
|
||||
(2) The submitting thread must then submit the operation for processing using
|
||||
one of the following two functions::
|
||||
|
||||
int fscache_submit_op(struct fscache_object *object,
|
||||
struct fscache_operation *op);
|
||||
|
||||
int fscache_submit_exclusive_op(struct fscache_object *object,
|
||||
struct fscache_operation *op);
|
||||
|
||||
The first function should be used to submit non-exclusive ops and the
|
||||
second to submit exclusive ones. The caller must still set the
|
||||
FSCACHE_OP_EXCLUSIVE flag.
|
||||
|
||||
If successful, both functions will assign the operation to the specified
|
||||
object and return 0. -ENOBUFS will be returned if the object specified is
|
||||
permanently unavailable.
|
||||
|
||||
The operation manager will defer operations on an object that is still
|
||||
undergoing lookup or creation. The operation will also be deferred if an
|
||||
operation of conflicting exclusivity is in progress on the object.
|
||||
|
||||
If the operation is asynchronous, the manager will retain a reference to
|
||||
it, so the caller should put their reference to it by passing it to::
|
||||
|
||||
void fscache_put_operation(struct fscache_operation *op);
|
||||
|
||||
(3) If the submitting thread wants to do the work itself, and has marked the
|
||||
operation with FSCACHE_OP_MYTHREAD, then it should monitor
|
||||
FSCACHE_OP_WAITING as described above and check the state of the object if
|
||||
necessary (the object might have died while the thread was waiting).
|
||||
|
||||
When it has finished doing its processing, it should call
|
||||
fscache_op_complete() and fscache_put_operation() on it.
|
||||
|
||||
(4) The operation holds an effective lock upon the object, preventing other
|
||||
exclusive ops conflicting until it is released. The operation can be
|
||||
enqueued for further immediate asynchronous processing by adjusting the
|
||||
CPU time provisioning option if necessary, eg::
|
||||
|
||||
op->flags &= ~FSCACHE_OP_TYPE;
|
||||
op->flags |= ~FSCACHE_OP_FAST;
|
||||
|
||||
and calling::
|
||||
|
||||
void fscache_enqueue_operation(struct fscache_operation *op)
|
||||
|
||||
This can be used to allow other things to have use of the worker thread
|
||||
pools.
|
||||
|
||||
|
||||
Asynchronous Callback
|
||||
=====================
|
||||
|
||||
When used in asynchronous mode, the worker thread pool will invoke the
|
||||
processor method with a pointer to the operation. This should then get at the
|
||||
container struct by using container_of()::
|
||||
|
||||
static void fscache_write_op(struct fscache_operation *_op)
|
||||
{
|
||||
struct fscache_storage *op =
|
||||
container_of(_op, struct fscache_storage, op);
|
||||
...
|
||||
}
|
||||
|
||||
The caller holds a reference on the operation, and will invoke
|
||||
fscache_put_operation() when the processor function returns. The processor
|
||||
function is at liberty to call fscache_enqueue_operation() or to take extra
|
||||
references.
|
||||
|
|
@ -23,8 +23,8 @@ on it as usual. The `DAX` code currently only supports files with a block
|
|||
size equal to your kernel's `PAGE_SIZE`, so you may need to specify a block
|
||||
size when creating the filesystem.
|
||||
|
||||
Currently 3 filesystems support `DAX`: ext2, ext4 and xfs. Enabling `DAX` on them
|
||||
is different.
|
||||
Currently 4 filesystems support `DAX`: ext2, ext4, xfs and virtiofs.
|
||||
Enabling `DAX` on them is different.
|
||||
|
||||
Enabling DAX on ext2
|
||||
--------------------
|
||||
|
|
@ -168,6 +168,22 @@ if the underlying media does not support dax and/or the filesystem is
|
|||
overridden with a mount option.
|
||||
|
||||
|
||||
Enabling DAX on virtiofs
|
||||
----------------------------
|
||||
The semantic of DAX on virtiofs is basically equal to that on ext4 and xfs,
|
||||
except that when '-o dax=inode' is specified, virtiofs client derives the hint
|
||||
whether DAX shall be enabled or not from virtiofs server through FUSE protocol,
|
||||
rather than the persistent `FS_XFLAG_DAX` flag. That is, whether DAX shall be
|
||||
enabled or not is completely determined by virtiofs server, while virtiofs
|
||||
server itself may deploy various algorithm making this decision, e.g. depending
|
||||
on the persistent `FS_XFLAG_DAX` flag on the host.
|
||||
|
||||
It is still supported to set or clear persistent `FS_XFLAG_DAX` flag inside
|
||||
guest, but it is not guaranteed that DAX will be enabled or disabled for
|
||||
corresponding file then. Users inside guest still need to call statx(2) and
|
||||
check the statx flag `STATX_ATTR_DAX` to see if DAX is enabled for this file.
|
||||
|
||||
|
||||
Implementation Tips for Block Driver Writers
|
||||
--------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -454,7 +454,8 @@ operation table looks like the following::
|
|||
void *term_func_priv);
|
||||
|
||||
int (*prepare_write)(struct netfs_cache_resources *cres,
|
||||
loff_t *_start, size_t *_len, loff_t i_size);
|
||||
loff_t *_start, size_t *_len, loff_t i_size,
|
||||
bool no_space_allocated_yet);
|
||||
|
||||
int (*write)(struct netfs_cache_resources *cres,
|
||||
loff_t start_pos,
|
||||
|
|
@ -515,11 +516,14 @@ The methods defined in the table are:
|
|||
|
||||
* ``prepare_write()``
|
||||
|
||||
[Required] Called to adjust a write to the cache and check that there is
|
||||
sufficient space in the cache. The start and length values indicate the
|
||||
size of the write that netfslib is proposing, and this can be adjusted by
|
||||
the cache to respect DIO boundaries. The file size is passed for
|
||||
information.
|
||||
[Required] Called to prepare a write to the cache to take place. This
|
||||
involves checking to see whether the cache has sufficient space to honour
|
||||
the write. ``*_start`` and ``*_len`` indicate the region to be written; the
|
||||
region can be shrunk or it can be expanded to a page boundary either way as
|
||||
necessary to align for direct I/O. i_size holds the size of the object and
|
||||
is provided for reference. no_space_allocated_yet is set to true if the
|
||||
caller is certain that no data has been written to that region - for example
|
||||
if it tried to do a read from there already.
|
||||
|
||||
* ``write()``
|
||||
|
||||
|
|
|
|||
|
|
@ -155,14 +155,14 @@ follows::
|
|||
autofdo
|
||||
$ cd autofdo/
|
||||
$ ls
|
||||
description preset1 preset3 preset5 preset7 preset9
|
||||
feature_refs preset2 preset4 preset6 preset8
|
||||
description feature_refs preset1 preset3 preset5 preset7 preset9
|
||||
enable preset preset2 preset4 preset6 preset8
|
||||
$ cat description
|
||||
Setup ETMs with strobing for autofdo
|
||||
$ cat feature_refs
|
||||
strobing
|
||||
|
||||
Each preset declared has a preset<n> subdirectory declared. The values for
|
||||
Each preset declared has a 'preset<n>' subdirectory declared. The values for
|
||||
the preset can be examined::
|
||||
|
||||
$ cat preset1/values
|
||||
|
|
@ -170,6 +170,9 @@ the preset can be examined::
|
|||
$ cat preset2/values
|
||||
strobing.window = 0x1388 strobing.period = 0x4
|
||||
|
||||
The 'enable' and 'preset' files allow the control of a configuration when
|
||||
using CoreSight with sysfs.
|
||||
|
||||
The features referenced by the configuration can be examined in the features
|
||||
directory::
|
||||
|
||||
|
|
@ -211,19 +214,13 @@ also declared in the perf 'cs_etm' event infrastructure so that they can
|
|||
be selected when running trace under perf::
|
||||
|
||||
$ ls /sys/devices/cs_etm
|
||||
configurations format perf_event_mux_interval_ms sinks type
|
||||
events nr_addr_filters power
|
||||
cpu0 cpu2 events nr_addr_filters power subsystem uevent
|
||||
cpu1 cpu3 format perf_event_mux_interval_ms sinks type
|
||||
|
||||
Key directories here are 'configurations' - which lists the loaded
|
||||
configurations, and 'events' - a generic perf directory which allows
|
||||
selection on the perf command line.::
|
||||
The key directory here is 'events' - a generic perf directory which allows
|
||||
selection on the perf command line. As with the sinks entries, this provides
|
||||
a hash of the configuration name.
|
||||
|
||||
$ ls configurations/
|
||||
autofdo
|
||||
$ cat configurations/autofdo
|
||||
0xa7c3dddd
|
||||
|
||||
As with the sinks entries, this provides a hash of the configuration name.
|
||||
The entry in the 'events' directory uses perfs built in syntax generator
|
||||
to substitute the syntax for the name when evaluating the command::
|
||||
|
||||
|
|
@ -242,3 +239,56 @@ A preset to override the current parameter values can also be selected::
|
|||
|
||||
When configurations are selected in this way, then the trace sink used is
|
||||
automatically selected.
|
||||
|
||||
Using Configurations in sysfs
|
||||
=============================
|
||||
|
||||
Coresight can be controlled using sysfs. When this is in use then a configuration
|
||||
can be made active for the devices that are used in the sysfs session.
|
||||
|
||||
In a configuration there are 'enable' and 'preset' files.
|
||||
|
||||
To enable a configuration for use with sysfs::
|
||||
|
||||
$ cd configurations/autofdo
|
||||
$ echo 1 > enable
|
||||
|
||||
This will then use any default parameter values in the features - which can be
|
||||
adjusted as described above.
|
||||
|
||||
To use a preset<n> set of parameter values::
|
||||
|
||||
$ echo 3 > preset
|
||||
|
||||
This will select preset3 for the configuration.
|
||||
The valid values for preset are 0 - to deselect presets, and any value of
|
||||
<n> where a preset<n> sub-directory is present.
|
||||
|
||||
Note that the active sysfs configuration is a global parameter, therefore
|
||||
only a single configuration can be active for sysfs at any one time.
|
||||
Attempting to enable a second configuration will result in an error.
|
||||
Additionally, attempting to disable the configuration while in use will
|
||||
also result in an error.
|
||||
|
||||
The use of the active configuration by sysfs is independent of the configuration
|
||||
used in perf.
|
||||
|
||||
|
||||
Creating and Loading Custom Configurations
|
||||
==========================================
|
||||
|
||||
Custom configurations and / or features can be dynamically loaded into the
|
||||
system by using a loadable module.
|
||||
|
||||
An example of a custom configuration is found in ./samples/coresight.
|
||||
|
||||
This creates a new configuration that uses the existing built in
|
||||
strobing feature, but provides a different set of presets.
|
||||
|
||||
When the module is loaded, then the configuration appears in the configfs
|
||||
file system and is selectable in the same way as the built in configuration
|
||||
described above.
|
||||
|
||||
Configurations can use previously loaded features. The system will ensure
|
||||
that it is not possible to unload a feature that is currently in use, by
|
||||
enforcing the unload order as the strict reverse of the load order.
|
||||
|
|
|
|||
87
MAINTAINERS
87
MAINTAINERS
|
|
@ -1077,6 +1077,15 @@ W: http://ez.analog.com/community/linux-device-drivers
|
|||
F: Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml
|
||||
F: drivers/iio/adc/ad7780.c
|
||||
|
||||
ANALOG DEVICES INC AD74413R DRIVER
|
||||
M: Cosmin Tanislav <cosmin.tanislav@analog.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://ez.analog.com/community/linux-device-drivers
|
||||
F: Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml
|
||||
F: drivers/iio/addac/ad74413r.c
|
||||
F: include/dt-bindings/iio/addac/adi,ad74413r.h
|
||||
|
||||
ANALOG DEVICES INC AD9389B DRIVER
|
||||
M: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
L: linux-media@vger.kernel.org
|
||||
|
|
@ -1903,6 +1912,7 @@ F: Documentation/trace/coresight/*
|
|||
F: drivers/hwtracing/coresight/*
|
||||
F: include/dt-bindings/arm/coresight-cti-dt.h
|
||||
F: include/linux/coresight*
|
||||
F: samples/coresight/*
|
||||
F: tools/perf/arch/arm/util/auxtrace.c
|
||||
F: tools/perf/arch/arm/util/cs-etm.c
|
||||
F: tools/perf/arch/arm/util/cs-etm.h
|
||||
|
|
@ -2304,6 +2314,7 @@ F: Documentation/devicetree/bindings/gpio/mstar,msc313-gpio.yaml
|
|||
F: arch/arm/boot/dts/mstar-*
|
||||
F: arch/arm/mach-mstar/
|
||||
F: drivers/clk/mstar/
|
||||
F: drivers/clocksource/timer-msc313e.c
|
||||
F: drivers/gpio/gpio-msc313.c
|
||||
F: drivers/rtc/rtc-msc313.c
|
||||
F: drivers/watchdog/msc313e_wdt.c
|
||||
|
|
@ -2807,12 +2818,15 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
|||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti.git
|
||||
F: Documentation/devicetree/bindings/arm/toshiba.yaml
|
||||
F: Documentation/devicetree/bindings/clock/toshiba,tmpv770x-pipllct.yaml
|
||||
F: Documentation/devicetree/bindings/clock/toshiba,tmpv770x-pismu.yaml
|
||||
F: Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
|
||||
F: Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
|
||||
F: Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml
|
||||
F: Documentation/devicetree/bindings/pinctrl/toshiba,visconti-pinctrl.yaml
|
||||
F: Documentation/devicetree/bindings/watchdog/toshiba,visconti-wdt.yaml
|
||||
F: arch/arm64/boot/dts/toshiba/
|
||||
F: drivers/clk/visconti/
|
||||
F: drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
|
||||
F: drivers/gpio/gpio-visconti.c
|
||||
F: drivers/pci/controller/dwc/pcie-visconti.c
|
||||
|
|
@ -3730,7 +3744,7 @@ M: Al Cooper <alcooperx@gmail.com>
|
|||
L: linux-usb@vger.kernel.org
|
||||
L: bcm-kernel-feedback-list@broadcom.com
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/usb/brcm,bdc.txt
|
||||
F: Documentation/devicetree/bindings/usb/brcm,bdc.yaml
|
||||
F: drivers/usb/gadget/udc/bdc/
|
||||
|
||||
BROADCOM BMIPS CPUFREQ DRIVER
|
||||
|
|
@ -3813,7 +3827,7 @@ M: Doug Berger <opendmb@gmail.com>
|
|||
M: Florian Fainelli <f.fainelli@gmail.com>
|
||||
L: bcm-kernel-feedback-list@broadcom.com
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
|
||||
F: Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.yaml
|
||||
F: drivers/gpio/gpio-brcmstb.c
|
||||
|
||||
BROADCOM BRCMSTB I2C DRIVER
|
||||
|
|
@ -3871,7 +3885,7 @@ M: Florian Fainelli <f.fainelli@gmail.com>
|
|||
L: bcm-kernel-feedback-list@broadcom.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/net/brcm,bcmgenet.txt
|
||||
F: Documentation/devicetree/bindings/net/brcm,bcmgenet.yaml
|
||||
F: Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml
|
||||
F: drivers/net/ethernet/broadcom/genet/
|
||||
F: drivers/net/ethernet/broadcom/unimac.h
|
||||
|
|
@ -3913,7 +3927,7 @@ M: Rafał Miłecki <rafal@milecki.pl>
|
|||
M: bcm-kernel-feedback-list@broadcom.com
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/brcm,amac.txt
|
||||
F: Documentation/devicetree/bindings/net/brcm,amac.yaml
|
||||
F: drivers/net/ethernet/broadcom/bgmac*
|
||||
F: drivers/net/ethernet/broadcom/unimac.h
|
||||
|
||||
|
|
@ -3988,7 +4002,7 @@ M: Markus Mayer <mmayer@broadcom.com>
|
|||
M: bcm-kernel-feedback-list@broadcom.com
|
||||
L: linux-pm@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt
|
||||
F: Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml
|
||||
F: drivers/thermal/broadcom/brcmstb*
|
||||
|
||||
BROADCOM STB DPFE DRIVER
|
||||
|
|
@ -4024,6 +4038,7 @@ L: netdev@vger.kernel.org
|
|||
S: Supported
|
||||
F: drivers/net/ethernet/broadcom/bcmsysport.*
|
||||
F: drivers/net/ethernet/broadcom/unimac.h
|
||||
F: Documentation/devicetree/bindings/net/brcm,systemport.yaml
|
||||
|
||||
BROADCOM TG3 GIGABIT ETHERNET DRIVER
|
||||
M: Siva Reddy Kallam <siva.kallam@broadcom.com>
|
||||
|
|
@ -4563,9 +4578,12 @@ F: drivers/media/cec/i2c/ch7322.c
|
|||
CIRRUS LOGIC AUDIO CODEC DRIVERS
|
||||
M: James Schulman <james.schulman@cirrus.com>
|
||||
M: David Rhodes <david.rhodes@cirrus.com>
|
||||
M: Lucas Tanure <tanureal@opensource.cirrus.com>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
L: patches@opensource.cirrus.com
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/sound/cirrus,cs*
|
||||
F: sound/pci/hda/cs*
|
||||
F: sound/soc/codecs/cs*
|
||||
|
||||
CIRRUS LOGIC DSP FIRMWARE DRIVER
|
||||
|
|
@ -4765,6 +4783,8 @@ M: Ian Abbott <abbotti@mev.co.uk>
|
|||
M: H Hartley Sweeten <hsweeten@visionengravers.com>
|
||||
S: Odd Fixes
|
||||
F: drivers/comedi/
|
||||
F: include/linux/comedi/
|
||||
F: include/uapi/linux/comedi.h
|
||||
|
||||
COMMON CLK FRAMEWORK
|
||||
M: Michael Turquette <mturquette@baylibre.com>
|
||||
|
|
@ -7076,9 +7096,7 @@ S: Maintained
|
|||
F: drivers/mmc/host/cqhci*
|
||||
|
||||
EMULEX 10Gbps iSCSI - OneConnect DRIVER
|
||||
M: Subbu Seetharaman <subbu.seetharaman@broadcom.com>
|
||||
M: Ketan Mukadam <ketan.mukadam@broadcom.com>
|
||||
M: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
|
||||
L: linux-scsi@vger.kernel.org
|
||||
S: Supported
|
||||
W: http://www.broadcom.com
|
||||
|
|
@ -9771,6 +9789,13 @@ F: drivers/crypto/keembay/keembay-ocs-hcu-core.c
|
|||
F: drivers/crypto/keembay/ocs-hcu.c
|
||||
F: drivers/crypto/keembay/ocs-hcu.h
|
||||
|
||||
INTEL THUNDER BAY EMMC PHY DRIVER
|
||||
M: Nandhini Srikandan <nandhini.srikandan@intel.com>
|
||||
M: Rashmi A <rashmi.a@intel.com>
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/phy/intel,phy-thunderbay-emmc.yaml
|
||||
F: drivers/phy/intel/phy-intel-thunderbay-emmc.c
|
||||
|
||||
INTEL MANAGEMENT ENGINE (mei)
|
||||
M: Tomas Winkler <tomas.winkler@intel.com>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
|
|
@ -13818,12 +13843,24 @@ F: Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml
|
|||
F: drivers/gpu/drm/imx/dcss/
|
||||
|
||||
NXP i.MX 8QXP ADC DRIVER
|
||||
M: Cai Huoqing <caihuoqing@baidu.com>
|
||||
M: Cai Huoqing <cai.huoqing@linux.dev>
|
||||
M: Haibo Chen <haibo.chen@nxp.com>
|
||||
L: linux-imx@nxp.com
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Supported
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
|
||||
F: drivers/iio/adc/imx8qxp-adc.c
|
||||
|
||||
NXP i.MX 7D/6SX/6UL AND VF610 ADC DRIVER
|
||||
M: Haibo Chen <haibo.chen@nxp.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
L: linux-imx@nxp.com
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
|
||||
F: Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
|
||||
F: drivers/iio/adc/imx7d_adc.c
|
||||
F: drivers/iio/adc/vf610_adc.c
|
||||
|
||||
NXP PF8100/PF8121A/PF8200 PMIC REGULATOR DEVICE DRIVER
|
||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
||||
S: Maintained
|
||||
|
|
@ -15874,6 +15911,15 @@ F: Documentation/admin-guide/media/qcom_camss.rst
|
|||
F: Documentation/devicetree/bindings/media/*camss*
|
||||
F: drivers/media/platform/qcom/camss/
|
||||
|
||||
QUALCOMM CLOCK DRIVERS
|
||||
M: Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
|
||||
F: Documentation/devicetree/bindings/clock/qcom,*
|
||||
F: drivers/clk/qcom/
|
||||
F: include/dt-bindings/clock/qcom,*
|
||||
|
||||
QUALCOMM CORE POWER REDUCTION (CPR) AVS DRIVER
|
||||
M: Niklas Cassel <nks@flawful.org>
|
||||
L: linux-pm@vger.kernel.org
|
||||
|
|
@ -17013,10 +17059,8 @@ M: Chanwoo Choi <cw00.choi@samsung.com>
|
|||
L: linux-samsung-soc@vger.kernel.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk.git
|
||||
F: Documentation/devicetree/bindings/clock/exynos*.txt
|
||||
F: Documentation/devicetree/bindings/clock/samsung,*.yaml
|
||||
F: Documentation/devicetree/bindings/clock/samsung,s3c*
|
||||
F: Documentation/devicetree/bindings/clock/samsung,s5p*
|
||||
F: drivers/clk/samsung/
|
||||
F: include/dt-bindings/clock/exynos*.h
|
||||
F: include/dt-bindings/clock/s3c*.h
|
||||
|
|
@ -17985,6 +18029,7 @@ F: Documentation/sound/
|
|||
F: include/sound/
|
||||
F: include/uapi/sound/
|
||||
F: sound/
|
||||
F: tools/testing/selftests/alsa
|
||||
|
||||
SOUND - COMPRESSED AUDIO
|
||||
M: Vinod Koul <vkoul@kernel.org>
|
||||
|
|
@ -18004,6 +18049,13 @@ F: include/sound/dmaengine_pcm.h
|
|||
F: sound/core/pcm_dmaengine.c
|
||||
F: sound/soc/soc-generic-dmaengine-pcm.c
|
||||
|
||||
SOUND - ALSA SELFTESTS
|
||||
M: Mark Brown <broonie@kernel.org>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
L: linux-kselftest@vger.kernel.org
|
||||
S: Supported
|
||||
F: tools/testing/selftests/alsa
|
||||
|
||||
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
|
||||
M: Liam Girdwood <lgirdwood@gmail.com>
|
||||
M: Mark Brown <broonie@kernel.org>
|
||||
|
|
@ -21080,6 +21132,13 @@ F: fs/xfs/
|
|||
F: include/uapi/linux/dqblk_xfs.h
|
||||
F: include/uapi/linux/fsmap.h
|
||||
|
||||
XILINX AMS DRIVER
|
||||
M: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>
|
||||
L: linux-iio@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml
|
||||
F: drivers/iio/adc/xilinx-ams.c
|
||||
|
||||
XILINX AXI ETHERNET DRIVER
|
||||
M: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
|
||||
S: Maintained
|
||||
|
|
@ -21148,6 +21207,12 @@ T: git https://github.com/Xilinx/linux-xlnx.git
|
|||
F: Documentation/devicetree/bindings/phy/xlnx,zynqmp-psgtr.yaml
|
||||
F: drivers/phy/xilinx/phy-zynqmp.c
|
||||
|
||||
XILINX EVENT MANAGEMENT DRIVER
|
||||
M: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
|
||||
S: Maintained
|
||||
F: drivers/soc/xilinx/xlnx_event_manager.c
|
||||
F: include/linux/firmware/xlnx-event-manager.h
|
||||
|
||||
XILLYBUS DRIVER
|
||||
M: Eli Billauer <eli.billauer@gmail.com>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
|
|
|
|||
11
Makefile
11
Makefile
|
|
@ -708,17 +708,6 @@ ifdef CONFIG_FUNCTION_TRACER
|
|||
CC_FLAGS_FTRACE := -pg
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CC_IS_GCC
|
||||
RETPOLINE_CFLAGS := $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
|
||||
RETPOLINE_VDSO_CFLAGS := $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register)
|
||||
endif
|
||||
ifdef CONFIG_CC_IS_CLANG
|
||||
RETPOLINE_CFLAGS := -mretpoline-external-thunk
|
||||
RETPOLINE_VDSO_CFLAGS := -mretpoline
|
||||
endif
|
||||
export RETPOLINE_CFLAGS
|
||||
export RETPOLINE_VDSO_CFLAGS
|
||||
|
||||
include $(srctree)/arch/$(SRCARCH)/Makefile
|
||||
|
||||
ifdef need-config
|
||||
|
|
|
|||
1
android/ACK_SHA
Normal file
1
android/ACK_SHA
Normal file
|
|
@ -0,0 +1 @@
|
|||
8bbe6f703a8dfcaf7b310c897491bd55a13be6ca
|
||||
227526
android/abi_gki_aarch64.xml
Normal file
227526
android/abi_gki_aarch64.xml
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -1 +0,0 @@
|
|||
lib/test_stackinit.ko
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "omap34xx.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/*
|
||||
* Default secure signed bootloader (Nokia X-Loader) does not enable L3 firewall
|
||||
|
|
@ -630,63 +631,92 @@ indicator {
|
|||
};
|
||||
|
||||
lp5523: lp5523@32 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "national,lp5523";
|
||||
reg = <0x32>;
|
||||
clock-mode = /bits/ 8 <0>; /* LP55XX_CLOCK_AUTO */
|
||||
enable-gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */
|
||||
enable-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */
|
||||
|
||||
chan0 {
|
||||
led@0 {
|
||||
reg = <0>;
|
||||
chan-name = "lp5523:kb1";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
|
||||
chan1 {
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
chan-name = "lp5523:kb2";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
|
||||
chan2 {
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
chan-name = "lp5523:kb3";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
|
||||
chan3 {
|
||||
led@3 {
|
||||
reg = <3>;
|
||||
chan-name = "lp5523:kb4";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
|
||||
chan4 {
|
||||
led@4 {
|
||||
reg = <4>;
|
||||
chan-name = "lp5523:b";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
};
|
||||
|
||||
chan5 {
|
||||
led@5 {
|
||||
reg = <5>;
|
||||
chan-name = "lp5523:g";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
};
|
||||
|
||||
chan6 {
|
||||
led@6 {
|
||||
reg = <6>;
|
||||
chan-name = "lp5523:r";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
};
|
||||
|
||||
chan7 {
|
||||
led@7 {
|
||||
reg = <7>;
|
||||
chan-name = "lp5523:kb5";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
|
||||
chan8 {
|
||||
led@8 {
|
||||
reg = <8>;
|
||||
chan-name = "lp5523:kb6";
|
||||
led-cur = /bits/ 8 <50>;
|
||||
max-cur = /bits/ 8 <100>;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_KBD_BACKLIGHT;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@
|
|||
static int crypto_blake2s_update_arm(struct shash_desc *desc,
|
||||
const u8 *in, unsigned int inlen)
|
||||
{
|
||||
return crypto_blake2s_update(desc, in, inlen, blake2s_compress);
|
||||
return crypto_blake2s_update(desc, in, inlen, false);
|
||||
}
|
||||
|
||||
static int crypto_blake2s_final_arm(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
return crypto_blake2s_final(desc, out, blake2s_compress);
|
||||
return crypto_blake2s_final(desc, out, false);
|
||||
}
|
||||
|
||||
#define BLAKE2S_ALG(name, driver_name, digest_size) \
|
||||
|
|
|
|||
|
|
@ -64,11 +64,6 @@ perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs
|
|||
{
|
||||
struct frame_tail __user *tail;
|
||||
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
|
||||
/* We don't support guest os callchain now */
|
||||
return;
|
||||
}
|
||||
|
||||
perf_callchain_store(entry, regs->ARM_pc);
|
||||
|
||||
if (!current->mm)
|
||||
|
|
@ -100,20 +95,12 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
|
|||
{
|
||||
struct stackframe fr;
|
||||
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
|
||||
/* We don't support guest os callchain now */
|
||||
return;
|
||||
}
|
||||
|
||||
arm_get_current_stackframe(regs, &fr);
|
||||
walk_stackframe(&fr, callchain_trace, entry);
|
||||
}
|
||||
|
||||
unsigned long perf_instruction_pointer(struct pt_regs *regs)
|
||||
{
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
|
||||
return perf_guest_cbs->get_guest_ip();
|
||||
|
||||
return instruction_pointer(regs);
|
||||
}
|
||||
|
||||
|
|
@ -121,17 +108,10 @@ unsigned long perf_misc_flags(struct pt_regs *regs)
|
|||
{
|
||||
int misc = 0;
|
||||
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
|
||||
if (perf_guest_cbs->is_user_mode())
|
||||
misc |= PERF_RECORD_MISC_GUEST_USER;
|
||||
else
|
||||
misc |= PERF_RECORD_MISC_GUEST_KERNEL;
|
||||
} else {
|
||||
if (user_mode(regs))
|
||||
misc |= PERF_RECORD_MISC_USER;
|
||||
else
|
||||
misc |= PERF_RECORD_MISC_KERNEL;
|
||||
}
|
||||
if (user_mode(regs))
|
||||
misc |= PERF_RECORD_MISC_USER;
|
||||
else
|
||||
misc |= PERF_RECORD_MISC_KERNEL;
|
||||
|
||||
return misc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,10 @@ unsigned long xen_released_pages;
|
|||
struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata;
|
||||
|
||||
static __read_mostly unsigned int xen_events_irq;
|
||||
static __read_mostly phys_addr_t xen_grant_frames;
|
||||
|
||||
#define GRANT_TABLE_INDEX 0
|
||||
#define EXT_REGION_INDEX 1
|
||||
|
||||
uint32_t xen_start_flags;
|
||||
EXPORT_SYMBOL(xen_start_flags);
|
||||
|
|
@ -300,9 +304,115 @@ static void __init xen_acpi_guest_init(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XEN_UNPOPULATED_ALLOC
|
||||
/*
|
||||
* A type-less specific Xen resource which contains extended regions
|
||||
* (unused regions of guest physical address space provided by the hypervisor).
|
||||
*/
|
||||
static struct resource xen_resource = {
|
||||
.name = "Xen unused space",
|
||||
};
|
||||
|
||||
int __init arch_xen_unpopulated_init(struct resource **res)
|
||||
{
|
||||
struct device_node *np;
|
||||
struct resource *regs, *tmp_res;
|
||||
uint64_t min_gpaddr = -1, max_gpaddr = 0;
|
||||
unsigned int i, nr_reg = 0;
|
||||
int rc;
|
||||
|
||||
if (!xen_domain())
|
||||
return -ENODEV;
|
||||
|
||||
if (!acpi_disabled)
|
||||
return -ENODEV;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "xen,xen");
|
||||
if (WARN_ON(!np))
|
||||
return -ENODEV;
|
||||
|
||||
/* Skip region 0 which is reserved for grant table space */
|
||||
while (of_get_address(np, nr_reg + EXT_REGION_INDEX, NULL, NULL))
|
||||
nr_reg++;
|
||||
|
||||
if (!nr_reg) {
|
||||
pr_err("No extended regions are found\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
regs = kcalloc(nr_reg, sizeof(*regs), GFP_KERNEL);
|
||||
if (!regs)
|
||||
return -ENOMEM;
|
||||
|
||||
/*
|
||||
* Create resource from extended regions provided by the hypervisor to be
|
||||
* used as unused address space for Xen scratch pages.
|
||||
*/
|
||||
for (i = 0; i < nr_reg; i++) {
|
||||
rc = of_address_to_resource(np, i + EXT_REGION_INDEX, ®s[i]);
|
||||
if (rc)
|
||||
goto err;
|
||||
|
||||
if (max_gpaddr < regs[i].end)
|
||||
max_gpaddr = regs[i].end;
|
||||
if (min_gpaddr > regs[i].start)
|
||||
min_gpaddr = regs[i].start;
|
||||
}
|
||||
|
||||
xen_resource.start = min_gpaddr;
|
||||
xen_resource.end = max_gpaddr;
|
||||
|
||||
/*
|
||||
* Mark holes between extended regions as unavailable. The rest of that
|
||||
* address space will be available for the allocation.
|
||||
*/
|
||||
for (i = 1; i < nr_reg; i++) {
|
||||
resource_size_t start, end;
|
||||
|
||||
/* There is an overlap between regions */
|
||||
if (regs[i - 1].end + 1 > regs[i].start) {
|
||||
rc = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* There is no hole between regions */
|
||||
if (regs[i - 1].end + 1 == regs[i].start)
|
||||
continue;
|
||||
|
||||
start = regs[i - 1].end + 1;
|
||||
end = regs[i].start - 1;
|
||||
|
||||
tmp_res = kzalloc(sizeof(*tmp_res), GFP_KERNEL);
|
||||
if (!tmp_res) {
|
||||
rc = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
tmp_res->name = "Unavailable space";
|
||||
tmp_res->start = start;
|
||||
tmp_res->end = end;
|
||||
|
||||
rc = insert_resource(&xen_resource, tmp_res);
|
||||
if (rc) {
|
||||
pr_err("Cannot insert resource %pR (%d)\n", tmp_res, rc);
|
||||
kfree(tmp_res);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
*res = &xen_resource;
|
||||
|
||||
err:
|
||||
kfree(regs);
|
||||
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void __init xen_dt_guest_init(void)
|
||||
{
|
||||
struct device_node *xen_node;
|
||||
struct resource res;
|
||||
|
||||
xen_node = of_find_compatible_node(NULL, NULL, "xen,xen");
|
||||
if (!xen_node) {
|
||||
|
|
@ -311,13 +421,19 @@ static void __init xen_dt_guest_init(void)
|
|||
}
|
||||
|
||||
xen_events_irq = irq_of_parse_and_map(xen_node, 0);
|
||||
|
||||
if (of_address_to_resource(xen_node, GRANT_TABLE_INDEX, &res)) {
|
||||
pr_err("Xen grant table region is not found\n");
|
||||
return;
|
||||
}
|
||||
xen_grant_frames = res.start;
|
||||
}
|
||||
|
||||
static int __init xen_guest_init(void)
|
||||
{
|
||||
struct xen_add_to_physmap xatp;
|
||||
struct shared_info *shared_info_page = NULL;
|
||||
int cpu;
|
||||
int rc, cpu;
|
||||
|
||||
if (!xen_domain())
|
||||
return 0;
|
||||
|
|
@ -370,12 +486,16 @@ static int __init xen_guest_init(void)
|
|||
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,
|
||||
&xen_auto_xlat_grant_frames.vaddr,
|
||||
xen_auto_xlat_grant_frames.count)) {
|
||||
if (!xen_grant_frames) {
|
||||
xen_auto_xlat_grant_frames.count = gnttab_max_grant_frames();
|
||||
rc = xen_xlate_map_ballooned_pages(&xen_auto_xlat_grant_frames.pfn,
|
||||
&xen_auto_xlat_grant_frames.vaddr,
|
||||
xen_auto_xlat_grant_frames.count);
|
||||
} else
|
||||
rc = gnttab_setup_auto_xlat_frames(xen_grant_frames);
|
||||
if (rc) {
|
||||
free_percpu(xen_vcpu_info);
|
||||
return -ENOMEM;
|
||||
return rc;
|
||||
}
|
||||
gnttab_init();
|
||||
|
||||
|
|
|
|||
|
|
@ -1989,12 +1989,6 @@ config CMDLINE_FROM_BOOTLOADER
|
|||
the boot loader doesn't provide any, the default kernel command
|
||||
string provided in CMDLINE will be used.
|
||||
|
||||
config CMDLINE_EXTEND
|
||||
bool "Extend bootloader kernel arguments"
|
||||
help
|
||||
The command-line arguments provided by the boot loader will be
|
||||
appended to the default kernel command string.
|
||||
|
||||
config CMDLINE_FORCE
|
||||
bool "Always use the default kernel command string"
|
||||
help
|
||||
|
|
|
|||
|
|
@ -995,9 +995,8 @@ hda@3510000 {
|
|||
<&bpmp TEGRA194_CLK_HDA2CODEC_2X>;
|
||||
clock-names = "hda", "hda2hdmi", "hda2codec_2x";
|
||||
resets = <&bpmp TEGRA194_RESET_HDA>,
|
||||
<&bpmp TEGRA194_RESET_HDA2HDMICODEC>,
|
||||
<&bpmp TEGRA194_RESET_HDA2CODEC_2X>;
|
||||
reset-names = "hda", "hda2hdmi", "hda2codec_2x";
|
||||
<&bpmp TEGRA194_RESET_HDA2HDMICODEC>;
|
||||
reset-names = "hda", "hda2hdmi";
|
||||
power-domains = <&bpmp TEGRA194_POWER_DOMAIN_DISP>;
|
||||
interconnects = <&mc TEGRA194_MEMORY_CLIENT_HDAR &emc>,
|
||||
<&mc TEGRA194_MEMORY_CLIENT_HDAW &emc>;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ CONFIG_TASKS_RUDE_RCU=y
|
|||
# CONFIG_TEST_PRINTF is not set
|
||||
# CONFIG_TEST_RHASHTABLE is not set
|
||||
# CONFIG_TEST_SORT is not set
|
||||
# CONFIG_TEST_STACKINIT is not set
|
||||
# CONFIG_TEST_STATIC_KEYS is not set
|
||||
# CONFIG_TEST_STRING_HELPERS is not set
|
||||
# CONFIG_TEST_STRSCPY is not set
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ CONFIG_SETEND_EMULATION=y
|
|||
CONFIG_RANDOMIZE_BASE=y
|
||||
# CONFIG_RANDOMIZE_MODULE_REGION_FULL is not set
|
||||
CONFIG_CMDLINE="stack_depot_disable=on kasan.stacktrace=off cgroup_disable=pressure"
|
||||
CONFIG_CMDLINE_EXTEND=y
|
||||
# CONFIG_DMI is not set
|
||||
CONFIG_PM_WAKELOCKS=y
|
||||
CONFIG_PM_WAKELOCKS_LIMIT=0
|
||||
|
|
@ -370,6 +369,7 @@ CONFIG_SERIAL_8250=y
|
|||
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
# CONFIG_SERIAL_8250_EXAR is not set
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=0
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
|
|
@ -650,7 +650,6 @@ CONFIG_PRINTK_CALLER=y
|
|||
CONFIG_DYNAMIC_DEBUG_CORE=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_INFO_DWARF4=y
|
||||
CONFIG_DEBUG_INFO_BTF=y
|
||||
CONFIG_HEADERS_INSTALL=y
|
||||
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
|
|
@ -681,4 +680,4 @@ CONFIG_HIST_TRIGGERS=y
|
|||
CONFIG_PID_IN_CONTEXTIDR=y
|
||||
CONFIG_KUNIT=y
|
||||
CONFIG_KUNIT_DEBUGFS=y
|
||||
CONFIG_TEST_STACKINIT=m
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
|
|
|
|||
|
|
@ -675,8 +675,15 @@ unsigned long kvm_mmio_read_buf(const void *buf, unsigned int len);
|
|||
int kvm_handle_mmio_return(struct kvm_vcpu *vcpu);
|
||||
int io_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa);
|
||||
|
||||
int kvm_perf_init(void);
|
||||
int kvm_perf_teardown(void);
|
||||
/*
|
||||
* Returns true if a Performance Monitoring Interrupt (PMI), a.k.a. perf event,
|
||||
* arrived in guest context. For arm64, any event that arrives while a vCPU is
|
||||
* loaded is considered to be "in guest".
|
||||
*/
|
||||
static inline bool kvm_arch_pmi_in_guest(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_GUEST_PERF_EVENTS) && !!vcpu;
|
||||
}
|
||||
|
||||
long kvm_hypercall_pv_features(struct kvm_vcpu *vcpu);
|
||||
gpa_t kvm_init_stolen_time(struct kvm_vcpu *vcpu);
|
||||
|
|
|
|||
|
|
@ -214,11 +214,8 @@ static __init void parse_cmdline(void)
|
|||
{
|
||||
const u8 *prop = get_bootargs_cmdline();
|
||||
|
||||
if (IS_ENABLED(CONFIG_CMDLINE_EXTEND) ||
|
||||
IS_ENABLED(CONFIG_CMDLINE_FORCE) ||
|
||||
!prop) {
|
||||
if (IS_ENABLED(CONFIG_CMDLINE_FORCE) || !prop)
|
||||
__parse_cmdline(CONFIG_CMDLINE, true);
|
||||
}
|
||||
|
||||
if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && prop)
|
||||
__parse_cmdline(prop, true);
|
||||
|
|
|
|||
|
|
@ -102,7 +102,9 @@ KVM_NVHE_ALIAS(__stop___kvm_ex_table);
|
|||
KVM_NVHE_ALIAS(kvm_arm_hyp_percpu_base);
|
||||
|
||||
/* PMU available static key */
|
||||
#ifdef CONFIG_HW_PERF_EVENTS
|
||||
KVM_NVHE_ALIAS(kvm_arm_pmu_available);
|
||||
#endif
|
||||
|
||||
/* Position-independent library routines */
|
||||
KVM_NVHE_ALIAS_HYP(clear_page, __pi_clear_page);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ void *module_alloc(unsigned long size)
|
|||
module_alloc_end = MODULES_END;
|
||||
|
||||
p = __vmalloc_node_range(size, MODULE_ALIGN, module_alloc_base,
|
||||
module_alloc_end, gfp_mask, PAGE_KERNEL, 0,
|
||||
module_alloc_end, gfp_mask, PAGE_KERNEL, VM_DEFER_KMEMLEAK,
|
||||
NUMA_NO_NODE, __builtin_return_address(0));
|
||||
|
||||
if (!p && IS_ENABLED(CONFIG_ARM64_MODULE_PLTS) &&
|
||||
|
|
@ -58,7 +58,7 @@ void *module_alloc(unsigned long size)
|
|||
PAGE_KERNEL, 0, NUMA_NO_NODE,
|
||||
__builtin_return_address(0));
|
||||
|
||||
if (p && (kasan_module_alloc(p, size) < 0)) {
|
||||
if (p && (kasan_module_alloc(p, size, gfp_mask) < 0)) {
|
||||
vfree(p);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ compat_user_backtrace(struct compat_frame_tail __user *tail,
|
|||
void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
|
||||
if (perf_guest_state()) {
|
||||
/* We don't support guest os callchain now */
|
||||
return;
|
||||
}
|
||||
|
|
@ -141,7 +141,7 @@ static bool callchain_trace(void *data, unsigned long pc)
|
|||
void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
|
||||
if (perf_guest_state()) {
|
||||
/* We don't support guest os callchain now */
|
||||
return;
|
||||
}
|
||||
|
|
@ -151,18 +151,19 @@ void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
|
|||
|
||||
unsigned long perf_instruction_pointer(struct pt_regs *regs)
|
||||
{
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
|
||||
return perf_guest_cbs->get_guest_ip();
|
||||
if (perf_guest_state())
|
||||
return perf_guest_get_ip();
|
||||
|
||||
return instruction_pointer(regs);
|
||||
}
|
||||
|
||||
unsigned long perf_misc_flags(struct pt_regs *regs)
|
||||
{
|
||||
unsigned int guest_state = perf_guest_state();
|
||||
int misc = 0;
|
||||
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
|
||||
if (perf_guest_cbs->is_user_mode())
|
||||
if (guest_state) {
|
||||
if (guest_state & PERF_GUEST_USER)
|
||||
misc |= PERF_RECORD_MISC_GUEST_USER;
|
||||
else
|
||||
misc |= PERF_RECORD_MISC_GUEST_KERNEL;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ menuconfig KVM
|
|||
select HAVE_KVM_IRQ_BYPASS
|
||||
select HAVE_KVM_VCPU_RUN_PID_CHANGE
|
||||
select SCHED_INFO
|
||||
select GUEST_PERF_EVENTS if PERF_EVENTS
|
||||
help
|
||||
Support hosting virtualized guest machines.
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ obj-$(CONFIG_KVM) += hyp/
|
|||
|
||||
kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
|
||||
$(KVM)/vfio.o $(KVM)/irqchip.o $(KVM)/binary_stats.o \
|
||||
arm.o mmu.o mmio.o psci.o perf.o hypercalls.o pvtime.o \
|
||||
arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.o \
|
||||
inject_fault.o va_layout.o handle_exit.o \
|
||||
guest.o debug.o reset.o sys_regs.o \
|
||||
vgic-sys-reg-v3.o fpsimd.o pmu.o \
|
||||
|
|
|
|||
|
|
@ -503,6 +503,13 @@ bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu)
|
|||
return vcpu_mode_priv(vcpu);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GUEST_PERF_EVENTS
|
||||
unsigned long kvm_arch_vcpu_get_ip(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return *vcpu_pc(vcpu);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Just ensure a guest exit from a particular CPU */
|
||||
static void exit_vm_noop(void *info)
|
||||
{
|
||||
|
|
@ -1775,7 +1782,8 @@ static int init_subsystems(void)
|
|||
if (err)
|
||||
goto out;
|
||||
|
||||
kvm_perf_init();
|
||||
kvm_register_perf_callbacks(NULL);
|
||||
|
||||
kvm_sys_reg_table_init();
|
||||
|
||||
out:
|
||||
|
|
@ -2163,7 +2171,7 @@ int kvm_arch_init(void *opaque)
|
|||
/* NOP: Compiling as a module not supported */
|
||||
void kvm_arch_exit(void)
|
||||
{
|
||||
kvm_perf_teardown();
|
||||
kvm_unregister_perf_callbacks();
|
||||
}
|
||||
|
||||
static int __init early_kvm_mode_cfg(char *arg)
|
||||
|
|
|
|||
|
|
@ -1,59 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Based on the x86 implementation.
|
||||
*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
* Author: Marc Zyngier <marc.zyngier@arm.com>
|
||||
*/
|
||||
|
||||
#include <linux/perf_event.h>
|
||||
#include <linux/kvm_host.h>
|
||||
|
||||
#include <asm/kvm_emulate.h>
|
||||
|
||||
DEFINE_STATIC_KEY_FALSE(kvm_arm_pmu_available);
|
||||
|
||||
static int kvm_is_in_guest(void)
|
||||
{
|
||||
return kvm_get_running_vcpu() != NULL;
|
||||
}
|
||||
|
||||
static int kvm_is_user_mode(void)
|
||||
{
|
||||
struct kvm_vcpu *vcpu;
|
||||
|
||||
vcpu = kvm_get_running_vcpu();
|
||||
|
||||
if (vcpu)
|
||||
return !vcpu_mode_priv(vcpu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long kvm_get_guest_ip(void)
|
||||
{
|
||||
struct kvm_vcpu *vcpu;
|
||||
|
||||
vcpu = kvm_get_running_vcpu();
|
||||
|
||||
if (vcpu)
|
||||
return *vcpu_pc(vcpu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct perf_guest_info_callbacks kvm_guest_cbs = {
|
||||
.is_in_guest = kvm_is_in_guest,
|
||||
.is_user_mode = kvm_is_user_mode,
|
||||
.get_guest_ip = kvm_get_guest_ip,
|
||||
};
|
||||
|
||||
int kvm_perf_init(void)
|
||||
{
|
||||
return perf_register_guest_info_callbacks(&kvm_guest_cbs);
|
||||
}
|
||||
|
||||
int kvm_perf_teardown(void)
|
||||
{
|
||||
return perf_unregister_guest_info_callbacks(&kvm_guest_cbs);
|
||||
}
|
||||
|
|
@ -14,6 +14,8 @@
|
|||
#include <kvm/arm_pmu.h>
|
||||
#include <kvm/arm_vgic.h>
|
||||
|
||||
DEFINE_STATIC_KEY_FALSE(kvm_arm_pmu_available);
|
||||
|
||||
static void kvm_pmu_create_perf_event(struct kvm_vcpu *vcpu, u64 select_idx);
|
||||
static void kvm_pmu_update_pmc_chained(struct kvm_vcpu *vcpu, u64 select_idx);
|
||||
static void kvm_pmu_stop_counter(struct kvm_vcpu *vcpu, struct kvm_pmc *pmc);
|
||||
|
|
|
|||
|
|
@ -88,10 +88,6 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
|
|||
{
|
||||
unsigned long fp = 0;
|
||||
|
||||
/* C-SKY does not support virtualization. */
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
|
||||
return;
|
||||
|
||||
fp = regs->regs[4];
|
||||
perf_callchain_store(entry, regs->pc);
|
||||
|
||||
|
|
@ -112,12 +108,6 @@ void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
|
|||
{
|
||||
struct stackframe fr;
|
||||
|
||||
/* C-SKY does not support virtualization. */
|
||||
if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
|
||||
pr_warn("C-SKY does not support perf in guest mode!");
|
||||
return;
|
||||
}
|
||||
|
||||
fr.fp = regs->regs[4];
|
||||
fr.lr = regs->lr;
|
||||
walk_stackframe(&fr, entry);
|
||||
|
|
|
|||
|
|
@ -848,7 +848,7 @@ register_unwind_table (struct module *mod)
|
|||
{
|
||||
struct unw_table_entry *start = (void *) mod->arch.unwind->sh_addr;
|
||||
struct unw_table_entry *end = start + mod->arch.unwind->sh_size / sizeof (*start);
|
||||
struct unw_table_entry tmp, *e1, *e2, *core, *init;
|
||||
struct unw_table_entry *e1, *e2, *core, *init;
|
||||
unsigned long num_init = 0, num_core = 0;
|
||||
|
||||
/* First, count how many init and core unwind-table entries there are. */
|
||||
|
|
@ -865,9 +865,7 @@ register_unwind_table (struct module *mod)
|
|||
for (e1 = start; e1 < end; ++e1) {
|
||||
for (e2 = e1 + 1; e2 < end; ++e2) {
|
||||
if (e2->start_offset < e1->start_offset) {
|
||||
tmp = *e1;
|
||||
*e1 = *e2;
|
||||
*e2 = tmp;
|
||||
swap(*e1, *e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,10 +208,7 @@ sort_regions (struct rsvd_region *rsvd_region, int max)
|
|||
while (max--) {
|
||||
for (j = 0; j < max; ++j) {
|
||||
if (rsvd_region[j].start > rsvd_region[j+1].start) {
|
||||
struct rsvd_region tmp;
|
||||
tmp = rsvd_region[j];
|
||||
rsvd_region[j] = rsvd_region[j + 1];
|
||||
rsvd_region[j + 1] = tmp;
|
||||
swap(rsvd_region[j], rsvd_region[j + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,6 +264,7 @@ static struct attribute * cache_default_attrs[] = {
|
|||
&shared_cpu_map.attr,
|
||||
NULL
|
||||
};
|
||||
ATTRIBUTE_GROUPS(cache_default);
|
||||
|
||||
#define to_object(k) container_of(k, struct cache_info, kobj)
|
||||
#define to_attr(a) container_of(a, struct cache_attr, attr)
|
||||
|
|
@ -284,7 +285,7 @@ static const struct sysfs_ops cache_sysfs_ops = {
|
|||
|
||||
static struct kobj_type cache_ktype = {
|
||||
.sysfs_ops = &cache_sysfs_ops,
|
||||
.default_attrs = cache_default_attrs,
|
||||
.default_groups = cache_default_groups,
|
||||
};
|
||||
|
||||
static struct kobj_type cache_ktype_percpu_entry = {
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
|
|||
* @n_pages: number of contiguous pages to allocate
|
||||
*
|
||||
* Allocate the specified number of contiguous uncached pages on the
|
||||
* the requested node. If not enough contiguous uncached pages are available
|
||||
* requested node. If not enough contiguous uncached pages are available
|
||||
* on the requested node, roundrobin starting with the next higher node.
|
||||
*/
|
||||
unsigned long uncached_alloc_page(int starting_nid, int n_pages)
|
||||
|
|
|
|||
|
|
@ -264,7 +264,6 @@ config BMIPS_GENERIC
|
|||
bool "Broadcom Generic BMIPS kernel"
|
||||
select ARCH_HAS_RESET_CONTROLLER
|
||||
select ARCH_HAS_SYNC_DMA_FOR_CPU_ALL
|
||||
select ARCH_HAS_PHYS_TO_DMA
|
||||
select BOOT_RAW
|
||||
select NO_EXCEPT_FILL
|
||||
select USE_OF
|
||||
|
|
@ -640,9 +639,6 @@ config MACH_REALTEK_RTL
|
|||
select SYS_SUPPORTS_MIPS16
|
||||
select SYS_SUPPORTS_MULTITHREADING
|
||||
select SYS_SUPPORTS_VPE_LOADER
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select SYS_HAS_EARLY_PRINTK_8250
|
||||
select USE_GENERIC_EARLY_PRINTK_8250
|
||||
select BOOT_RAW
|
||||
select PINCTRL
|
||||
select USE_OF
|
||||
|
|
@ -765,7 +761,6 @@ config SGI_IP30
|
|||
select HAVE_PCI
|
||||
select IRQ_MIPS_CPU
|
||||
select IRQ_DOMAIN_HIERARCHY
|
||||
select NR_CPUS_DEFAULT_2
|
||||
select PCI_DRIVERS_GENERIC
|
||||
select PCI_XTALK_BRIDGE
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
|
|
@ -1611,7 +1606,6 @@ config CPU_R4300
|
|||
depends on SYS_HAS_CPU_R4300
|
||||
select CPU_SUPPORTS_32BIT_KERNEL
|
||||
select CPU_SUPPORTS_64BIT_KERNEL
|
||||
select CPU_HAS_LOAD_STORE_LR
|
||||
help
|
||||
MIPS Technologies R4300-series processors.
|
||||
|
||||
|
|
@ -1907,6 +1901,10 @@ config SYS_HAS_CPU_MIPS64_R1
|
|||
config SYS_HAS_CPU_MIPS64_R2
|
||||
bool
|
||||
|
||||
config SYS_HAS_CPU_MIPS64_R5
|
||||
bool
|
||||
select ARCH_HAS_SYNC_DMA_FOR_CPU if DMA_NONCOHERENT
|
||||
|
||||
config SYS_HAS_CPU_MIPS64_R6
|
||||
bool
|
||||
select ARCH_HAS_SYNC_DMA_FOR_CPU if DMA_NONCOHERENT
|
||||
|
|
@ -2065,7 +2063,7 @@ config CPU_SUPPORTS_ADDRWINCFG
|
|||
bool
|
||||
config CPU_SUPPORTS_HUGEPAGES
|
||||
bool
|
||||
depends on !(32BIT && (ARCH_PHYS_ADDR_T_64BIT || EVA))
|
||||
depends on !(32BIT && (PHYS_ADDR_T_64BIT || EVA))
|
||||
config MIPS_PGD_C0_CONTEXT
|
||||
bool
|
||||
depends on 64BIT
|
||||
|
|
@ -2116,6 +2114,16 @@ config MIPS_VA_BITS_48
|
|||
|
||||
If unsure, say N.
|
||||
|
||||
config ZBOOT_LOAD_ADDRESS
|
||||
hex "Compressed kernel load address"
|
||||
default 0xffffffff80400000 if BCM47XX
|
||||
default 0x0
|
||||
depends on SYS_SUPPORTS_ZBOOT
|
||||
help
|
||||
The address to load compressed kernel, aka vmlinuz.
|
||||
|
||||
This is only used if non-zero.
|
||||
|
||||
choice
|
||||
prompt "Kernel page size"
|
||||
default PAGE_SIZE_4KB
|
||||
|
|
|
|||
|
|
@ -253,9 +253,7 @@ endif
|
|||
#
|
||||
# Board-dependent options and extra files
|
||||
#
|
||||
ifdef need-compiler
|
||||
include $(srctree)/arch/mips/Kbuild.platforms
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PHYSICAL_START
|
||||
load-y = $(CONFIG_PHYSICAL_START)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Notes :
|
||||
* This file must ONLY be built when CONFIG_GPIOLIB=y and
|
||||
* CONFIG_ALCHEMY_GPIO_INDIRECT=n, otherwise compilation will fail!
|
||||
* au1000 SoC have only one GPIO block : GPIO1
|
||||
* Au1100, Au15x0, Au12x0 have a second one : GPIO2
|
||||
* Au1300 is totally different: 1 block with up to 128 GPIOs
|
||||
|
|
|
|||
|
|
@ -34,15 +34,6 @@
|
|||
|
||||
static char ath79_sys_type[ATH79_SYS_TYPE_LEN];
|
||||
|
||||
static void ath79_restart(char *command)
|
||||
{
|
||||
local_irq_disable();
|
||||
ath79_device_reset_set(AR71XX_RESET_FULL_CHIP);
|
||||
for (;;)
|
||||
if (cpu_wait)
|
||||
cpu_wait();
|
||||
}
|
||||
|
||||
static void ath79_halt(void)
|
||||
{
|
||||
while (1)
|
||||
|
|
@ -234,7 +225,6 @@ void __init plat_mem_setup(void)
|
|||
|
||||
detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
|
||||
|
||||
_machine_restart = ath79_restart;
|
||||
_machine_halt = ath79_halt;
|
||||
pm_power_off = ath79_halt;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,4 +4,3 @@
|
|||
cflags-$(CONFIG_BCM47XX) += \
|
||||
-I$(srctree)/arch/mips/include/asm/mach-bcm47xx
|
||||
load-$(CONFIG_BCM47XX) := 0xffffffff80001000
|
||||
zload-$(CONFIG_BCM47XX) += 0xffffffff80400000
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = {
|
|||
{{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
|
||||
|
|
@ -161,9 +162,12 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
|
|||
{{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
|
||||
{{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
|
||||
{{BCM47XX_BOARD_NETGEAR_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_R6300_V1, "Netgear R6300 V1"}, "U12H218T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
|
||||
|
|
@ -345,7 +349,7 @@ void __init bcm47xx_board_detect(void)
|
|||
|
||||
board_detected = bcm47xx_board_get_nvram();
|
||||
bcm47xx_board.board = board_detected->board;
|
||||
strlcpy(bcm47xx_board.name, board_detected->name,
|
||||
strscpy(bcm47xx_board.name, board_detected->name,
|
||||
BCM47XX_BOARD_MAX_NAME);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,12 @@
|
|||
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_asus_rtn10u[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(21, KEY_RESTART),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
|
||||
|
|
@ -276,6 +282,18 @@ bcm47xx_buttons_linksys_wrt310nv1[] __initconst = {
|
|||
BCM47XX_GPIO_KEY(8, KEY_UNKNOWN),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(8, KEY_RESTART),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
|
||||
|
|
@ -391,6 +409,17 @@ bcm47xx_buttons_netgear_r6200_v1[] __initconst = {
|
|||
BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_r6300_v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(12, KEY_RESTART),
|
||||
BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
|
|
@ -478,6 +507,9 @@ int __init bcm47xx_buttons_register(void)
|
|||
int err;
|
||||
|
||||
switch (board) {
|
||||
case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
|
||||
break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
|
||||
break;
|
||||
|
|
@ -608,6 +640,12 @@ int __init bcm47xx_buttons_register(void)
|
|||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
|
||||
break;
|
||||
|
|
@ -674,6 +712,12 @@ int __init bcm47xx_buttons_register(void)
|
|||
case BCM47XX_BOARD_NETGEAR_R6200_V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1);
|
||||
break;
|
||||
case BCM47XX_BOARD_NETGEAR_R6300_V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
|
||||
break;
|
||||
case BCM47XX_BOARD_NETGEAR_WN2500RP_V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1);
|
||||
break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,14 @@
|
|||
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_asus_rtn10u[] __initconst = {
|
||||
BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
|
|
@ -313,6 +321,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initconst = {
|
|||
BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
|
||||
BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
|
|
@ -556,6 +571,9 @@ void __init bcm47xx_leds_register(void)
|
|||
enum bcm47xx_board board = bcm47xx_board_get();
|
||||
|
||||
switch (board) {
|
||||
case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
|
||||
break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
|
||||
break;
|
||||
|
|
@ -689,6 +707,9 @@ void __init bcm47xx_leds_register(void)
|
|||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -387,6 +387,12 @@ struct clk *clk_get_parent(struct clk *clk)
|
|||
}
|
||||
EXPORT_SYMBOL(clk_get_parent);
|
||||
|
||||
int clk_set_parent(struct clk *clk, struct clk *parent)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(clk_set_parent);
|
||||
|
||||
unsigned long clk_get_rate(struct clk *clk)
|
||||
{
|
||||
if (!clk)
|
||||
|
|
|
|||
|
|
@ -1,68 +1,8 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2014 Kevin Cernekee <cernekee@gmail.com>
|
||||
*/
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
#define pr_fmt(fmt) "bmips-dma: " fmt
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/dma-direction.h>
|
||||
#include <linux/dma-direct.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/bmips.h>
|
||||
|
||||
/*
|
||||
* BCM338x has configurable address translation windows which allow the
|
||||
* peripherals' DMA addresses to be different from the Zephyr-visible
|
||||
* physical addresses. e.g. usb_dma_addr = zephyr_pa ^ 0x08000000
|
||||
*
|
||||
* If the "brcm,ubus" node has a "dma-ranges" property we will enable this
|
||||
* translation globally using the provided information. This implements a
|
||||
* very limited subset of "dma-ranges" support and it will probably be
|
||||
* replaced by a more generic version later.
|
||||
*/
|
||||
|
||||
struct bmips_dma_range {
|
||||
u32 child_addr;
|
||||
u32 parent_addr;
|
||||
u32 size;
|
||||
};
|
||||
|
||||
static struct bmips_dma_range *bmips_dma_ranges;
|
||||
|
||||
#define FLUSH_RAC 0x100
|
||||
|
||||
dma_addr_t phys_to_dma(struct device *dev, phys_addr_t pa)
|
||||
{
|
||||
struct bmips_dma_range *r;
|
||||
|
||||
for (r = bmips_dma_ranges; r && r->size; r++) {
|
||||
if (pa >= r->child_addr &&
|
||||
pa < (r->child_addr + r->size))
|
||||
return pa - r->child_addr + r->parent_addr;
|
||||
}
|
||||
return pa;
|
||||
}
|
||||
|
||||
phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
|
||||
{
|
||||
struct bmips_dma_range *r;
|
||||
|
||||
for (r = bmips_dma_ranges; r && r->size; r++) {
|
||||
if (dma_addr >= r->parent_addr &&
|
||||
dma_addr < (r->parent_addr + r->size))
|
||||
return dma_addr - r->parent_addr + r->child_addr;
|
||||
}
|
||||
return dma_addr;
|
||||
}
|
||||
#include <asm/io.h>
|
||||
|
||||
void arch_sync_dma_for_cpu_all(void)
|
||||
{
|
||||
|
|
@ -79,45 +19,3 @@ void arch_sync_dma_for_cpu_all(void)
|
|||
__raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);
|
||||
__raw_readl(cbr + BMIPS_RAC_CONFIG);
|
||||
}
|
||||
|
||||
static int __init bmips_init_dma_ranges(void)
|
||||
{
|
||||
struct device_node *np =
|
||||
of_find_compatible_node(NULL, NULL, "brcm,ubus");
|
||||
const __be32 *data;
|
||||
struct bmips_dma_range *r;
|
||||
int len;
|
||||
|
||||
if (!np)
|
||||
return 0;
|
||||
|
||||
data = of_get_property(np, "dma-ranges", &len);
|
||||
if (!data)
|
||||
goto out_good;
|
||||
|
||||
len /= sizeof(*data) * 3;
|
||||
if (!len)
|
||||
goto out_bad;
|
||||
|
||||
/* add a dummy (zero) entry at the end as a sentinel */
|
||||
bmips_dma_ranges = kcalloc(len + 1, sizeof(struct bmips_dma_range),
|
||||
GFP_KERNEL);
|
||||
if (!bmips_dma_ranges)
|
||||
goto out_bad;
|
||||
|
||||
for (r = bmips_dma_ranges; len; len--, r++) {
|
||||
r->child_addr = be32_to_cpup(data++);
|
||||
r->parent_addr = be32_to_cpup(data++);
|
||||
r->size = be32_to_cpup(data++);
|
||||
}
|
||||
|
||||
out_good:
|
||||
of_node_put(np);
|
||||
return 0;
|
||||
|
||||
out_bad:
|
||||
pr_err("error parsing dma-ranges property\n");
|
||||
of_node_put(np);
|
||||
return -EINVAL;
|
||||
}
|
||||
arch_initcall(bmips_init_dma_ranges);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ endif
|
|||
|
||||
vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o
|
||||
|
||||
vmlinuzobjs-$(CONFIG_KERNEL_ZSTD) += $(obj)/bswapdi.o $(obj)/ashldi3.o
|
||||
vmlinuzobjs-$(CONFIG_KERNEL_ZSTD) += $(obj)/bswapdi.o $(obj)/ashldi3.o $(obj)/clz_ctz.o
|
||||
|
||||
targets := $(notdir $(vmlinuzobjs-y))
|
||||
|
||||
|
|
@ -89,6 +89,10 @@ HOSTCFLAGS_calc_vmlinuz_load_addr.o += $(LINUXINCLUDE)
|
|||
# Calculate the load address of the compressed kernel image
|
||||
hostprogs := calc_vmlinuz_load_addr
|
||||
|
||||
ifneq (0x0,$(CONFIG_ZBOOT_LOAD_ADDRESS))
|
||||
zload-y = $(CONFIG_ZBOOT_LOAD_ADDRESS)
|
||||
endif
|
||||
|
||||
ifneq ($(zload-y),)
|
||||
VMLINUZ_LOAD_ADDRESS := $(zload-y)
|
||||
else
|
||||
|
|
|
|||
2
arch/mips/boot/compressed/clz_ctz.c
Normal file
2
arch/mips/boot/compressed/clz_ctz.c
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include "../../../../lib/clz_ctz.c"
|
||||
|
|
@ -584,4 +584,34 @@ shimphy@8000 {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
pcie_0: pcie@8b20000 {
|
||||
status = "disabled";
|
||||
compatible = "brcm,bcm7425-pcie";
|
||||
|
||||
ranges = <0x02000000 0x0 0xd0000000 0xd0000000 0x0 0x08000000
|
||||
0x02000000 0x0 0xd8000000 0xd8000000 0x0 0x08000000
|
||||
0x02000000 0x0 0xe0000000 0xe0000000 0x0 0x08000000
|
||||
0x02000000 0x0 0xe8000000 0xe8000000 0x0 0x08000000>;
|
||||
|
||||
reg = <0x10410000 0x19310>;
|
||||
aspm-no-l0s;
|
||||
device_type = "pci";
|
||||
msi-controller;
|
||||
msi-parent = <&pcie_0>;
|
||||
#address-cells = <0x3>;
|
||||
#size-cells = <0x2>;
|
||||
bus-range = <0x0 0xff>;
|
||||
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
|
||||
linux,pci-domain = <0x0>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <37>, <37>;
|
||||
interrupt-names = "pcie", "msi";
|
||||
#interrupt-cells = <0x1>;
|
||||
interrupt-map = <0 0 0 1 &periph_intc 0x21
|
||||
0 0 0 1 &periph_intc 0x22
|
||||
0 0 0 1 &periph_intc 0x23
|
||||
0 0 0 1 &periph_intc 0x24>;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -599,4 +599,34 @@ shimphy@8000 {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
pcie_0: pcie@8b20000 {
|
||||
status = "disabled";
|
||||
compatible = "brcm,bcm7435-pcie";
|
||||
|
||||
ranges = <0x02000000 0x0 0xd0000000 0xd0000000 0x0 0x08000000
|
||||
0x02000000 0x0 0xd8000000 0xd8000000 0x0 0x08000000
|
||||
0x02000000 0x0 0xe0000000 0xe0000000 0x0 0x08000000
|
||||
0x02000000 0x0 0xe8000000 0xe8000000 0x0 0x08000000>;
|
||||
|
||||
reg = <0x10410000 0x19310>;
|
||||
aspm-no-l0s;
|
||||
device_type = "pci";
|
||||
msi-controller;
|
||||
msi-parent = <&pcie_0>;
|
||||
#address-cells = <0x3>;
|
||||
#size-cells = <0x2>;
|
||||
bus-range = <0x0 0xff>;
|
||||
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
|
||||
linux,pci-domain = <0x0>;
|
||||
|
||||
interrupt-parent = <&periph_intc>;
|
||||
interrupts = <39>, <39>;
|
||||
interrupt-names = "pcie", "msi";
|
||||
#interrupt-cells = <0x1>;
|
||||
interrupt-map = <0 0 0 1 &periph_intc 0x23
|
||||
0 0 0 1 &periph_intc 0x24
|
||||
0 0 0 1 &periph_intc 0x25
|
||||
0 0 0 1 &periph_intc 0x26>;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -152,3 +152,12 @@ &mspi {
|
|||
&waketimer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie_0 {
|
||||
status = "okay";
|
||||
/* 1GB Memc0, 1GB Memc1 */
|
||||
brcm,scb-sizes = <0 0x40000000 0 0x40000000>;
|
||||
dma-ranges = <0x43000000 0x00000000 0x00000000 0x00000000 0x0 0x10000000
|
||||
0x43000000 0x00000000 0x10000000 0x20000000 0x0 0x30000000
|
||||
0x43000000 0x00000000 0x40000000 0x90000000 0x0 0x40000000>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -128,3 +128,12 @@ &mspi {
|
|||
&waketimer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie_0 {
|
||||
status = "okay";
|
||||
/* 1GB Memc0, 1GB Memc1 */
|
||||
brcm,scb-sizes = <0 0x40000000 0 0x40000000>;
|
||||
dma-ranges = <0x43000000 0x00000000 0x00000000 0x00000000 0x0 0x10000000
|
||||
0x43000000 0x00000000 0x10000000 0x20000000 0x0 0x30000000
|
||||
0x43000000 0x00000000 0x40000000 0x90000000 0x0 0x40000000>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -78,6 +78,18 @@ eth0_power: fixedregulator@0 {
|
|||
enable-active-high;
|
||||
};
|
||||
|
||||
hdmi_out: connector {
|
||||
compatible = "hdmi-connector";
|
||||
label = "HDMI OUT";
|
||||
type = "a";
|
||||
|
||||
port {
|
||||
hdmi_con: endpoint {
|
||||
remote-endpoint = <&dw_hdmi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ir: ir {
|
||||
compatible = "gpio-ir-receiver";
|
||||
gpios = <&gpe 3 GPIO_ACTIVE_LOW>;
|
||||
|
|
@ -102,6 +114,17 @@ otg_power: fixedregulator@2 {
|
|||
gpio = <&gpf 14 GPIO_ACTIVE_LOW>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
hdmi_power: fixedregulator@3 {
|
||||
compatible = "regulator-fixed";
|
||||
|
||||
regulator-name = "hdmi_power";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
|
||||
gpio = <&gpa 25 0>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
&ext {
|
||||
|
|
@ -114,11 +137,12 @@ &cgu {
|
|||
* precision.
|
||||
*/
|
||||
assigned-clocks = <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_RTC>,
|
||||
<&cgu JZ4780_CLK_SSIPLL>, <&cgu JZ4780_CLK_SSI>;
|
||||
<&cgu JZ4780_CLK_SSIPLL>, <&cgu JZ4780_CLK_SSI>,
|
||||
<&cgu JZ4780_CLK_HDMI>;
|
||||
assigned-clock-parents = <0>, <&cgu JZ4780_CLK_RTCLK>,
|
||||
<&cgu JZ4780_CLK_MPLL>,
|
||||
<&cgu JZ4780_CLK_SSIPLL>;
|
||||
assigned-clock-rates = <48000000>, <0>, <54000000>;
|
||||
assigned-clock-rates = <48000000>, <0>, <54000000>, <0>, <27000000>;
|
||||
};
|
||||
|
||||
&tcu {
|
||||
|
|
@ -509,6 +533,12 @@ pins_i2c4: i2c4 {
|
|||
bias-disable;
|
||||
};
|
||||
|
||||
pins_hdmi_ddc: hdmi_ddc {
|
||||
function = "hdmi-ddc";
|
||||
groups = "hdmi-ddc";
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pins_nemc: nemc {
|
||||
function = "nemc";
|
||||
groups = "nemc-data", "nemc-cle-ale", "nemc-rd-we", "nemc-frd-fwe";
|
||||
|
|
@ -539,3 +569,41 @@ pins_mmc1: mmc1 {
|
|||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pins_hdmi_ddc>;
|
||||
|
||||
hdmi-5v-supply = <&hdmi_power>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dw_hdmi_in: endpoint {
|
||||
remote-endpoint = <&lcd_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
dw_hdmi_out: endpoint {
|
||||
remote-endpoint = <&hdmi_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&lcdc0 {
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
lcd_out: endpoint {
|
||||
remote-endpoint = <&dw_hdmi_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ udc: usb@13040000 {
|
|||
|
||||
lcd: lcd-controller@13050000 {
|
||||
compatible = "ingenic,jz4725b-lcd";
|
||||
reg = <0x13050000 0x1000>;
|
||||
reg = <0x13050000 0x130>; /* tbc */
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <31>;
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ udc: usb@13040000 {
|
|||
|
||||
lcd: lcd-controller@13050000 {
|
||||
compatible = "ingenic,jz4740-lcd";
|
||||
reg = <0x13050000 0x1000>;
|
||||
reg = <0x13050000 0x60>; /* LCDCMD1+4 */
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <30>;
|
||||
|
|
|
|||
|
|
@ -399,7 +399,7 @@ gpu: gpu@13040000 {
|
|||
|
||||
lcd: lcd-controller@13050000 {
|
||||
compatible = "ingenic,jz4770-lcd";
|
||||
reg = <0x13050000 0x300>;
|
||||
reg = <0x13050000 0x130>; /* tbc */
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <31>;
|
||||
|
|
|
|||
|
|
@ -444,6 +444,46 @@ i2c4: i2c@10054000 {
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
hdmi: hdmi@10180000 {
|
||||
compatible = "ingenic,jz4780-dw-hdmi";
|
||||
reg = <0x10180000 0x8000>;
|
||||
reg-io-width = <4>;
|
||||
|
||||
clocks = <&cgu JZ4780_CLK_AHB0>, <&cgu JZ4780_CLK_HDMI>;
|
||||
clock-names = "iahb", "isfr";
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <3>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lcdc0: lcdc0@13050000 {
|
||||
compatible = "ingenic,jz4780-lcd";
|
||||
reg = <0x13050000 0x1800>;
|
||||
|
||||
clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>;
|
||||
clock-names = "lcd", "lcd_pclk";
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <31>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lcdc1: lcdc1@130a0000 {
|
||||
compatible = "ingenic,jz4780-lcd";
|
||||
reg = <0x130a0000 0x1800>;
|
||||
|
||||
clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD1PIXCLK>;
|
||||
clock-names = "lcd", "lcd_pclk";
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <23>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
nemc: nemc@13410000 {
|
||||
compatible = "ingenic,jz4780-nemc", "simple-mfd";
|
||||
reg = <0x13410000 0x10000>;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,11 @@ package0: bus@10000000 {
|
|||
0 0x40000000 0 0x40000000 0 0x40000000
|
||||
0xfe 0x00000000 0xfe 0x00000000 0 0x40000000>;
|
||||
|
||||
pm: reset-controller@1fe07000 {
|
||||
compatible = "loongson,ls2k-pm";
|
||||
reg = <0 0x1fe07000 0 0x422>;
|
||||
};
|
||||
|
||||
liointc0: interrupt-controller@1fe11400 {
|
||||
compatible = "loongson,liointc-2.0";
|
||||
reg = <0 0x1fe11400 0 0x40>,
|
||||
|
|
|
|||
|
|
@ -328,6 +328,7 @@ static int __init octeon_ehci_device_init(void)
|
|||
|
||||
pd->dev.platform_data = &octeon_ehci_pdata;
|
||||
octeon_ehci_hw_start(&pd->dev);
|
||||
put_device(&pd->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -391,6 +392,7 @@ static int __init octeon_ohci_device_init(void)
|
|||
|
||||
pd->dev.platform_data = &octeon_ohci_pdata;
|
||||
octeon_ohci_hw_start(&pd->dev);
|
||||
put_device(&pd->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -537,6 +537,7 @@ static int __init dwc3_octeon_device_init(void)
|
|||
devm_iounmap(&pdev->dev, base);
|
||||
devm_release_mem_region(&pdev->dev, res->start,
|
||||
resource_size(res));
|
||||
put_device(&pdev->dev);
|
||||
}
|
||||
} while (node != NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,13 @@ CONFIG_RC_DEVICES=y
|
|||
CONFIG_IR_GPIO_CIR=m
|
||||
CONFIG_IR_GPIO_TX=m
|
||||
CONFIG_MEDIA_SUPPORT=m
|
||||
CONFIG_DRM=m
|
||||
CONFIG_DRM_INGENIC=m
|
||||
CONFIG_DRM_INGENIC_DW_HDMI=m
|
||||
CONFIG_DRM_DISPLAY_CONNECTOR=m
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_FB=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
# CONFIG_HID is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
|
|
|
|||
|
|
@ -10,9 +10,6 @@ CONFIG_EXPERT=y
|
|||
CONFIG_SLAB=y
|
||||
CONFIG_MACH_TX49XX=y
|
||||
CONFIG_TOSHIBA_RBTX4927=y
|
||||
CONFIG_TOSHIBA_RBTX4938=y
|
||||
CONFIG_TOSHIBA_RBTX4939=y
|
||||
CONFIG_TOSHIBA_RBTX4938_MPLEX_KEEP=y
|
||||
# CONFIG_SECCOMP is not set
|
||||
CONFIG_PCI=y
|
||||
CONFIG_MODULES=y
|
||||
|
|
@ -38,7 +35,6 @@ CONFIG_MTD_JEDECPROBE=y
|
|||
CONFIG_MTD_CFI_AMDSTD=y
|
||||
CONFIG_MTD_COMPLEX_MAPPINGS=y
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_RBTX4939=y
|
||||
CONFIG_MTD_RAW_NAND=m
|
||||
CONFIG_MTD_NAND_TXX9NDFMC=m
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ void __init prom_init(void)
|
|||
if ((current_cpu_type() == CPU_R4000SC) ||
|
||||
(current_cpu_type() == CPU_R4400SC)) {
|
||||
static const char r4k_msg[] __initconst =
|
||||
"Please recompile with \"CONFIG_CPU_R4x00 = y\".\n";
|
||||
"Please recompile with \"CONFIG_CPU_R4X00 = y\".\n";
|
||||
printk(cpu_msg);
|
||||
printk(r4k_msg);
|
||||
dec_machine_halt();
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ cflags-$(CONFIG_MACH_INGENIC_SOC) += -I$(srctree)/arch/mips/include/asm/mach-ing
|
|||
cflags-$(CONFIG_MIPS_GENERIC) += -I$(srctree)/arch/mips/include/asm/mach-generic
|
||||
|
||||
load-$(CONFIG_MIPS_GENERIC) += 0xffffffff80100000
|
||||
zload-$(CONFIG_MIPS_GENERIC) += 0xffffffff81000000
|
||||
all-$(CONFIG_MIPS_GENERIC) := vmlinux.gz.itb
|
||||
all-$(CONFIG_MIPS_GENERIC) += vmlinux.gz.itb
|
||||
|
||||
its-y := vmlinux.its.S
|
||||
its-$(CONFIG_FIT_IMAGE_FDT_BOSTON) += board-boston.its.S
|
||||
|
|
|
|||
|
|
@ -110,14 +110,15 @@ void __init plat_mem_setup(void)
|
|||
|
||||
void __init device_tree_init(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
unflatten_and_copy_device_tree();
|
||||
mips_cpc_probe();
|
||||
|
||||
err = register_cps_smp_ops();
|
||||
if (err)
|
||||
err = register_up_smp_ops();
|
||||
if (!register_cps_smp_ops())
|
||||
return;
|
||||
if (!register_vsmp_smp_ops())
|
||||
return;
|
||||
|
||||
register_up_smp_ops();
|
||||
}
|
||||
|
||||
int __init apply_mips_fdt_fixups(void *fdt_out, size_t fdt_out_size,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <asm/sgidefs.h>
|
||||
#include <asm/asm-eva.h>
|
||||
#include <asm/isa-rev.h>
|
||||
|
||||
#ifndef __VDSO__
|
||||
/*
|
||||
|
|
@ -211,6 +212,8 @@ symbol = value
|
|||
#define LONG_SUB sub
|
||||
#define LONG_SUBU subu
|
||||
#define LONG_L lw
|
||||
#define LONG_LL ll
|
||||
#define LONG_SC sc
|
||||
#define LONG_S sw
|
||||
#define LONG_SP swp
|
||||
#define LONG_SLL sll
|
||||
|
|
@ -219,6 +222,8 @@ symbol = value
|
|||
#define LONG_SRLV srlv
|
||||
#define LONG_SRA sra
|
||||
#define LONG_SRAV srav
|
||||
#define LONG_INS ins
|
||||
#define LONG_EXT ext
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#define LONG .word
|
||||
|
|
@ -236,6 +241,8 @@ symbol = value
|
|||
#define LONG_SUB dsub
|
||||
#define LONG_SUBU dsubu
|
||||
#define LONG_L ld
|
||||
#define LONG_LL lld
|
||||
#define LONG_SC scd
|
||||
#define LONG_S sd
|
||||
#define LONG_SP sdp
|
||||
#define LONG_SLL dsll
|
||||
|
|
@ -244,6 +251,8 @@ symbol = value
|
|||
#define LONG_SRLV dsrlv
|
||||
#define LONG_SRA dsra
|
||||
#define LONG_SRAV dsrav
|
||||
#define LONG_INS dins
|
||||
#define LONG_EXT dext
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#define LONG .dword
|
||||
|
|
@ -320,6 +329,19 @@ symbol = value
|
|||
|
||||
#define SSNOP sll zero, zero, 1
|
||||
|
||||
/*
|
||||
* Using a branch-likely instruction to check the result of an sc instruction
|
||||
* works around a bug present in R10000 CPUs prior to revision 3.0 that could
|
||||
* cause ll-sc sequences to execute non-atomically.
|
||||
*/
|
||||
#ifdef CONFIG_WAR_R10000_LLSC
|
||||
# define SC_BEQZ beqzl
|
||||
#elif MIPS_ISA_REV >= 6
|
||||
# define SC_BEQZ beqzc
|
||||
#else
|
||||
# define SC_BEQZ beqz
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SGI_IP28
|
||||
/* Inhibit speculative stores to volatile (e.g.DMA) or invalid addresses. */
|
||||
#include <asm/cacheops.h>
|
||||
|
|
|
|||
|
|
@ -16,13 +16,12 @@
|
|||
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/asm.h>
|
||||
#include <asm/barrier.h>
|
||||
#include <asm/compiler.h>
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/cmpxchg.h>
|
||||
#include <asm/llsc.h>
|
||||
#include <asm/sync.h>
|
||||
#include <asm/war.h>
|
||||
|
||||
#define ATOMIC_OPS(pfx, type) \
|
||||
static __always_inline type arch_##pfx##_read(const pfx##_t *v) \
|
||||
|
|
@ -74,7 +73,7 @@ static __inline__ void arch_##pfx##_##op(type i, pfx##_t * v) \
|
|||
"1: " #ll " %0, %1 # " #pfx "_" #op " \n" \
|
||||
" " #asm_op " %0, %2 \n" \
|
||||
" " #sc " %0, %1 \n" \
|
||||
"\t" __SC_BEQZ "%0, 1b \n" \
|
||||
"\t" __stringify(SC_BEQZ) " %0, 1b \n" \
|
||||
" .set pop \n" \
|
||||
: "=&r" (temp), "+" GCC_OFF_SMALL_ASM() (v->counter) \
|
||||
: "Ir" (i) : __LLSC_CLOBBER); \
|
||||
|
|
@ -104,7 +103,7 @@ arch_##pfx##_##op##_return_relaxed(type i, pfx##_t * v) \
|
|||
"1: " #ll " %1, %2 # " #pfx "_" #op "_return\n" \
|
||||
" " #asm_op " %0, %1, %3 \n" \
|
||||
" " #sc " %0, %2 \n" \
|
||||
"\t" __SC_BEQZ "%0, 1b \n" \
|
||||
"\t" __stringify(SC_BEQZ) " %0, 1b \n" \
|
||||
" " #asm_op " %0, %1, %3 \n" \
|
||||
" .set pop \n" \
|
||||
: "=&r" (result), "=&r" (temp), \
|
||||
|
|
@ -137,7 +136,7 @@ arch_##pfx##_fetch_##op##_relaxed(type i, pfx##_t * v) \
|
|||
"1: " #ll " %1, %2 # " #pfx "_fetch_" #op "\n" \
|
||||
" " #asm_op " %0, %1, %3 \n" \
|
||||
" " #sc " %0, %2 \n" \
|
||||
"\t" __SC_BEQZ "%0, 1b \n" \
|
||||
"\t" __stringify(SC_BEQZ) " %0, 1b \n" \
|
||||
" .set pop \n" \
|
||||
" move %0, %1 \n" \
|
||||
: "=&r" (result), "=&r" (temp), \
|
||||
|
|
@ -237,7 +236,7 @@ static __inline__ type arch_##pfx##_sub_if_positive(type i, pfx##_t * v) \
|
|||
" .set push \n" \
|
||||
" .set " MIPS_ISA_LEVEL " \n" \
|
||||
" " #sc " %1, %2 \n" \
|
||||
" " __SC_BEQZ "%1, 1b \n" \
|
||||
" " __stringify(SC_BEQZ) " %1, 1b \n" \
|
||||
"2: " __SYNC(full, loongson3_war) " \n" \
|
||||
" .set pop \n" \
|
||||
: "=&r" (result), "=&r" (temp), \
|
||||
|
|
|
|||
|
|
@ -16,14 +16,12 @@
|
|||
#include <linux/bits.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/asm.h>
|
||||
#include <asm/barrier.h>
|
||||
#include <asm/byteorder.h> /* sigh ... */
|
||||
#include <asm/compiler.h>
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/isa-rev.h>
|
||||
#include <asm/llsc.h>
|
||||
#include <asm/sgidefs.h>
|
||||
#include <asm/war.h>
|
||||
|
||||
#define __bit_op(mem, insn, inputs...) do { \
|
||||
unsigned long __temp; \
|
||||
|
|
@ -32,10 +30,10 @@
|
|||
" .set push \n" \
|
||||
" .set " MIPS_ISA_LEVEL " \n" \
|
||||
" " __SYNC(full, loongson3_war) " \n" \
|
||||
"1: " __LL "%0, %1 \n" \
|
||||
"1: " __stringify(LONG_LL) " %0, %1 \n" \
|
||||
" " insn " \n" \
|
||||
" " __SC "%0, %1 \n" \
|
||||
" " __SC_BEQZ "%0, 1b \n" \
|
||||
" " __stringify(LONG_SC) " %0, %1 \n" \
|
||||
" " __stringify(SC_BEQZ) " %0, 1b \n" \
|
||||
" .set pop \n" \
|
||||
: "=&r"(__temp), "+" GCC_OFF_SMALL_ASM()(mem) \
|
||||
: inputs \
|
||||
|
|
@ -49,10 +47,10 @@
|
|||
" .set push \n" \
|
||||
" .set " MIPS_ISA_LEVEL " \n" \
|
||||
" " __SYNC(full, loongson3_war) " \n" \
|
||||
"1: " __LL ll_dst ", %2 \n" \
|
||||
"1: " __stringify(LONG_LL) " " ll_dst ", %2\n" \
|
||||
" " insn " \n" \
|
||||
" " __SC "%1, %2 \n" \
|
||||
" " __SC_BEQZ "%1, 1b \n" \
|
||||
" " __stringify(LONG_SC) " %1, %2 \n" \
|
||||
" " __stringify(SC_BEQZ) " %1, 1b \n" \
|
||||
" .set pop \n" \
|
||||
: "=&r"(__orig), "=&r"(__temp), \
|
||||
"+" GCC_OFF_SMALL_ASM()(mem) \
|
||||
|
|
@ -98,7 +96,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
|
|||
}
|
||||
|
||||
if ((MIPS_ISA_REV >= 2) && __builtin_constant_p(bit) && (bit >= 16)) {
|
||||
__bit_op(*m, __INS "%0, %3, %2, 1", "i"(bit), "r"(~0));
|
||||
__bit_op(*m, __stringify(LONG_INS) " %0, %3, %2, 1", "i"(bit), "r"(~0));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +124,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
|
|||
}
|
||||
|
||||
if ((MIPS_ISA_REV >= 2) && __builtin_constant_p(bit)) {
|
||||
__bit_op(*m, __INS "%0, $0, %2, 1", "i"(bit));
|
||||
__bit_op(*m, __stringify(LONG_INS) " %0, $0, %2, 1", "i"(bit));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -234,8 +232,8 @@ static inline int test_and_clear_bit(unsigned long nr,
|
|||
res = __mips_test_and_clear_bit(nr, addr);
|
||||
} else if ((MIPS_ISA_REV >= 2) && __builtin_constant_p(nr)) {
|
||||
res = __test_bit_op(*m, "%1",
|
||||
__EXT "%0, %1, %3, 1;"
|
||||
__INS "%1, $0, %3, 1",
|
||||
__stringify(LONG_EXT) " %0, %1, %3, 1;"
|
||||
__stringify(LONG_INS) " %1, $0, %3, 1",
|
||||
"i"(bit));
|
||||
} else {
|
||||
orig = __test_bit_op(*m, "%0",
|
||||
|
|
|
|||
|
|
@ -10,10 +10,9 @@
|
|||
|
||||
#include <linux/bug.h>
|
||||
#include <linux/irqflags.h>
|
||||
#include <asm/asm.h>
|
||||
#include <asm/compiler.h>
|
||||
#include <asm/llsc.h>
|
||||
#include <asm/sync.h>
|
||||
#include <asm/war.h>
|
||||
|
||||
/*
|
||||
* These functions doesn't exist, so if they are called you'll either:
|
||||
|
|
@ -48,7 +47,7 @@ extern unsigned long __xchg_called_with_bad_pointer(void)
|
|||
" move $1, %z3 \n" \
|
||||
" .set " MIPS_ISA_ARCH_LEVEL " \n" \
|
||||
" " st " $1, %1 \n" \
|
||||
"\t" __SC_BEQZ "$1, 1b \n" \
|
||||
"\t" __stringify(SC_BEQZ) " $1, 1b \n" \
|
||||
" .set pop \n" \
|
||||
: "=&r" (__ret), "=" GCC_OFF_SMALL_ASM() (*m) \
|
||||
: GCC_OFF_SMALL_ASM() (*m), "Jr" (val) \
|
||||
|
|
@ -127,7 +126,7 @@ unsigned long __xchg(volatile void *ptr, unsigned long x, int size)
|
|||
" move $1, %z4 \n" \
|
||||
" .set "MIPS_ISA_ARCH_LEVEL" \n" \
|
||||
" " st " $1, %1 \n" \
|
||||
"\t" __SC_BEQZ "$1, 1b \n" \
|
||||
"\t" __stringify(SC_BEQZ) " $1, 1b \n" \
|
||||
" .set pop \n" \
|
||||
"2: " __SYNC(full, loongson3_war) " \n" \
|
||||
: "=&r" (__ret), "=" GCC_OFF_SMALL_ASM() (*m) \
|
||||
|
|
@ -282,7 +281,7 @@ static inline unsigned long __cmpxchg64(volatile void *ptr,
|
|||
/* Attempt to store new at ptr */
|
||||
" scd %L1, %2 \n"
|
||||
/* If we failed, loop! */
|
||||
"\t" __SC_BEQZ "%L1, 1b \n"
|
||||
"\t" __stringify(SC_BEQZ) " %L1, 1b \n"
|
||||
"2: " __SYNC(full, loongson3_war) " \n"
|
||||
" .set pop \n"
|
||||
: "=&r"(ret),
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#ifdef CONFIG_32BIT
|
||||
#define KGDB_GDB_REG_SIZE 32
|
||||
#define GDB_SIZEOF_REG sizeof(u32)
|
||||
#else /* CONFIG_CPU_32BIT */
|
||||
#else /* CONFIG_32BIT */
|
||||
#define KGDB_GDB_REG_SIZE 64
|
||||
#define GDB_SIZEOF_REG sizeof(u64)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include <linux/threads.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include <asm/asm.h>
|
||||
#include <asm/inst.h>
|
||||
#include <asm/mipsregs.h>
|
||||
|
||||
|
|
@ -379,9 +380,9 @@ static inline void _kvm_atomic_set_c0_guest_reg(unsigned long *reg,
|
|||
__asm__ __volatile__(
|
||||
" .set push \n"
|
||||
" .set "MIPS_ISA_ARCH_LEVEL" \n"
|
||||
" " __LL "%0, %1 \n"
|
||||
" "__stringify(LONG_LL) " %0, %1 \n"
|
||||
" or %0, %2 \n"
|
||||
" " __SC "%0, %1 \n"
|
||||
" "__stringify(LONG_SC) " %0, %1 \n"
|
||||
" .set pop \n"
|
||||
: "=&r" (temp), "+m" (*reg)
|
||||
: "r" (val));
|
||||
|
|
@ -396,9 +397,9 @@ static inline void _kvm_atomic_clear_c0_guest_reg(unsigned long *reg,
|
|||
__asm__ __volatile__(
|
||||
" .set push \n"
|
||||
" .set "MIPS_ISA_ARCH_LEVEL" \n"
|
||||
" " __LL "%0, %1 \n"
|
||||
" "__stringify(LONG_LL) " %0, %1 \n"
|
||||
" and %0, %2 \n"
|
||||
" " __SC "%0, %1 \n"
|
||||
" "__stringify(LONG_SC) " %0, %1 \n"
|
||||
" .set pop \n"
|
||||
: "=&r" (temp), "+m" (*reg)
|
||||
: "r" (~val));
|
||||
|
|
@ -414,10 +415,10 @@ static inline void _kvm_atomic_change_c0_guest_reg(unsigned long *reg,
|
|||
__asm__ __volatile__(
|
||||
" .set push \n"
|
||||
" .set "MIPS_ISA_ARCH_LEVEL" \n"
|
||||
" " __LL "%0, %1 \n"
|
||||
" "__stringify(LONG_LL) " %0, %1 \n"
|
||||
" and %0, %2 \n"
|
||||
" or %0, %3 \n"
|
||||
" " __SC "%0, %1 \n"
|
||||
" "__stringify(LONG_SC) " %0, %1 \n"
|
||||
" .set pop \n"
|
||||
: "=&r" (temp), "+m" (*reg)
|
||||
: "r" (~change), "r" (val & change));
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Macros for 32/64-bit neutral inline assembler
|
||||
*/
|
||||
|
||||
#ifndef __ASM_LLSC_H
|
||||
#define __ASM_LLSC_H
|
||||
|
||||
#include <asm/isa-rev.h>
|
||||
|
||||
#if _MIPS_SZLONG == 32
|
||||
#define __LL "ll "
|
||||
#define __SC "sc "
|
||||
#define __INS "ins "
|
||||
#define __EXT "ext "
|
||||
#elif _MIPS_SZLONG == 64
|
||||
#define __LL "lld "
|
||||
#define __SC "scd "
|
||||
#define __INS "dins "
|
||||
#define __EXT "dext "
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Using a branch-likely instruction to check the result of an sc instruction
|
||||
* works around a bug present in R10000 CPUs prior to revision 3.0 that could
|
||||
* cause ll-sc sequences to execute non-atomically.
|
||||
*/
|
||||
#ifdef CONFIG_WAR_R10000_LLSC
|
||||
# define __SC_BEQZ "beqzl "
|
||||
#elif MIPS_ISA_REV >= 6
|
||||
# define __SC_BEQZ "beqzc "
|
||||
#else
|
||||
# define __SC_BEQZ "beqz "
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_LLSC_H */
|
||||
|
|
@ -5,9 +5,9 @@
|
|||
#include <linux/percpu.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/asm.h>
|
||||
#include <asm/cmpxchg.h>
|
||||
#include <asm/compiler.h>
|
||||
#include <asm/war.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
@ -31,34 +31,18 @@ static __inline__ long local_add_return(long i, local_t * l)
|
|||
{
|
||||
unsigned long result;
|
||||
|
||||
if (kernel_uses_llsc && IS_ENABLED(CONFIG_WAR_R10000_LLSC)) {
|
||||
unsigned long temp;
|
||||
|
||||
__asm__ __volatile__(
|
||||
" .set push \n"
|
||||
" .set arch=r4000 \n"
|
||||
__SYNC(full, loongson3_war) " \n"
|
||||
"1:" __LL "%1, %2 # local_add_return \n"
|
||||
" addu %0, %1, %3 \n"
|
||||
__SC "%0, %2 \n"
|
||||
" beqzl %0, 1b \n"
|
||||
" addu %0, %1, %3 \n"
|
||||
" .set pop \n"
|
||||
: "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
|
||||
: "Ir" (i), "m" (l->a.counter)
|
||||
: "memory");
|
||||
} else if (kernel_uses_llsc) {
|
||||
if (kernel_uses_llsc) {
|
||||
unsigned long temp;
|
||||
|
||||
__asm__ __volatile__(
|
||||
" .set push \n"
|
||||
" .set "MIPS_ISA_ARCH_LEVEL" \n"
|
||||
__SYNC(full, loongson3_war) " \n"
|
||||
"1:" __LL "%1, %2 # local_add_return \n"
|
||||
" addu %0, %1, %3 \n"
|
||||
__SC "%0, %2 \n"
|
||||
" beqz %0, 1b \n"
|
||||
" addu %0, %1, %3 \n"
|
||||
__SYNC(full, loongson3_war) " \n"
|
||||
"1:" __stringify(LONG_LL) " %1, %2 \n"
|
||||
__stringify(LONG_ADDU) " %0, %1, %3 \n"
|
||||
__stringify(LONG_SC) " %0, %2 \n"
|
||||
__stringify(SC_BEQZ) " %0, 1b \n"
|
||||
__stringify(LONG_ADDU) " %0, %1, %3 \n"
|
||||
" .set pop \n"
|
||||
: "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
|
||||
: "Ir" (i), "m" (l->a.counter)
|
||||
|
|
@ -80,34 +64,19 @@ static __inline__ long local_sub_return(long i, local_t * l)
|
|||
{
|
||||
unsigned long result;
|
||||
|
||||
if (kernel_uses_llsc && IS_ENABLED(CONFIG_WAR_R10000_LLSC)) {
|
||||
unsigned long temp;
|
||||
|
||||
__asm__ __volatile__(
|
||||
" .set push \n"
|
||||
" .set arch=r4000 \n"
|
||||
__SYNC(full, loongson3_war) " \n"
|
||||
"1:" __LL "%1, %2 # local_sub_return \n"
|
||||
" subu %0, %1, %3 \n"
|
||||
__SC "%0, %2 \n"
|
||||
" beqzl %0, 1b \n"
|
||||
" subu %0, %1, %3 \n"
|
||||
" .set pop \n"
|
||||
: "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
|
||||
: "Ir" (i), "m" (l->a.counter)
|
||||
: "memory");
|
||||
} else if (kernel_uses_llsc) {
|
||||
if (kernel_uses_llsc) {
|
||||
unsigned long temp;
|
||||
|
||||
__asm__ __volatile__(
|
||||
" .set push \n"
|
||||
" .set "MIPS_ISA_ARCH_LEVEL" \n"
|
||||
__SYNC(full, loongson3_war) " \n"
|
||||
"1:" __LL "%1, %2 # local_sub_return \n"
|
||||
" subu %0, %1, %3 \n"
|
||||
__SC "%0, %2 \n"
|
||||
" beqz %0, 1b \n"
|
||||
" subu %0, %1, %3 \n"
|
||||
__SYNC(full, loongson3_war) " \n"
|
||||
"1:" __stringify(LONG_LL) " %1, %2 \n"
|
||||
__stringify(LONG_SUBU) " %0, %1, %3 \n"
|
||||
__stringify(LONG_SUBU) " %0, %1, %3 \n"
|
||||
__stringify(LONG_SC) " %0, %2 \n"
|
||||
__stringify(SC_BEQZ) " %0, 1b \n"
|
||||
__stringify(LONG_SUBU) " %0, %1, %3 \n"
|
||||
" .set pop \n"
|
||||
: "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
|
||||
: "Ir" (i), "m" (l->a.counter)
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ enum bcm47xx_board {
|
|||
BCM47XX_BOARD_LINKSYS_WRT300NV11,
|
||||
BCM47XX_BOARD_LINKSYS_WRT310NV1,
|
||||
BCM47XX_BOARD_LINKSYS_WRT310NV2,
|
||||
BCM47XX_BOARD_LINKSYS_WRT320N_V1,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
|
||||
|
|
@ -99,9 +100,12 @@ enum bcm47xx_board {
|
|||
BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
|
||||
|
||||
BCM47XX_BOARD_NETGEAR_R6200_V1,
|
||||
BCM47XX_BOARD_NETGEAR_R6300_V1,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V8,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V9,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614_V10,
|
||||
BCM47XX_BOARD_NETGEAR_WN2500RP_V1,
|
||||
BCM47XX_BOARD_NETGEAR_WN2500RP_V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3300,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3400V1,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3400V2,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
nop
|
||||
/* Loongson-3A R2/R3 */
|
||||
andi t0, (PRID_IMP_MASK | PRID_REV_MASK)
|
||||
slti t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
|
||||
slti t0, t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
|
||||
bnez t0, 2f
|
||||
nop
|
||||
1:
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
nop
|
||||
/* Loongson-3A R2/R3 */
|
||||
andi t0, (PRID_IMP_MASK | PRID_REV_MASK)
|
||||
slti t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
|
||||
slti t0, t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
|
||||
bnez t0, 2f
|
||||
nop
|
||||
1:
|
||||
|
|
|
|||
|
|
@ -9,16 +9,8 @@
|
|||
|
||||
#define ioswabb(a, x) (x)
|
||||
#define __mem_ioswabb(a, x) (x)
|
||||
#if defined(CONFIG_TOSHIBA_RBTX4939) && \
|
||||
IS_ENABLED(CONFIG_SMC91X) && \
|
||||
defined(__BIG_ENDIAN)
|
||||
#define NEEDS_TXX9_IOSWABW
|
||||
extern u16 (*ioswabw)(volatile u16 *a, u16 x);
|
||||
extern u16 (*__mem_ioswabw)(volatile u16 *a, u16 x);
|
||||
#else
|
||||
#define ioswabw(a, x) le16_to_cpu((__force __le16)(x))
|
||||
#define __mem_ioswabw(a, x) (x)
|
||||
#endif
|
||||
#define ioswabl(a, x) le32_to_cpu((__force __le32)(x))
|
||||
#define __mem_ioswabl(a, x) (x)
|
||||
#define ioswabq(a, x) le64_to_cpu((__force __le64)(x))
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef __MIPS_ASM_MIPS_CPS_H__
|
||||
#define __MIPS_ASM_MIPS_CPS_H__
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
|
|
@ -112,14 +113,10 @@ static inline void clear_##unit##_##name(uint##sz##_t val) \
|
|||
*/
|
||||
static inline unsigned int mips_cps_numclusters(void)
|
||||
{
|
||||
unsigned int num_clusters;
|
||||
|
||||
if (mips_cm_revision() < CM_REV_CM3_5)
|
||||
return 1;
|
||||
|
||||
num_clusters = read_gcr_config() & CM_GCR_CONFIG_NUM_CLUSTERS;
|
||||
num_clusters >>= __ffs(CM_GCR_CONFIG_NUM_CLUSTERS);
|
||||
return num_clusters;
|
||||
return FIELD_GET(CM_GCR_CONFIG_NUM_CLUSTERS, read_gcr_config());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -169,7 +166,8 @@ static inline unsigned int mips_cps_numcores(unsigned int cluster)
|
|||
return 0;
|
||||
|
||||
/* Add one before masking to handle 0xff indicating no cores */
|
||||
return (mips_cps_cluster_config(cluster) + 1) & CM_GCR_CONFIG_PCORES;
|
||||
return FIELD_GET(CM_GCR_CONFIG_PCORES,
|
||||
mips_cps_cluster_config(cluster) + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -181,14 +179,11 @@ static inline unsigned int mips_cps_numcores(unsigned int cluster)
|
|||
*/
|
||||
static inline unsigned int mips_cps_numiocu(unsigned int cluster)
|
||||
{
|
||||
unsigned int num_iocu;
|
||||
|
||||
if (!mips_cm_present())
|
||||
return 0;
|
||||
|
||||
num_iocu = mips_cps_cluster_config(cluster) & CM_GCR_CONFIG_NUMIOCU;
|
||||
num_iocu >>= __ffs(CM_GCR_CONFIG_NUMIOCU);
|
||||
return num_iocu;
|
||||
return FIELD_GET(CM_GCR_CONFIG_NUMIOCU,
|
||||
mips_cps_cluster_config(cluster));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -230,7 +225,7 @@ static inline unsigned int mips_cps_numvps(unsigned int cluster, unsigned int co
|
|||
|
||||
mips_cm_unlock_other();
|
||||
|
||||
return (cfg + 1) & CM_GCR_Cx_CONFIG_PVPE;
|
||||
return FIELD_GET(CM_GCR_Cx_CONFIG_PVPE, cfg + 1);
|
||||
}
|
||||
|
||||
#endif /* __MIPS_ASM_MIPS_CPS_H__ */
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ enum cvmx_chip_types_enum {
|
|||
|
||||
/* Functions to return string based on type */
|
||||
#define ENUM_BRD_TYPE_CASE(x) \
|
||||
case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
|
||||
case x: return (&#x[16]); /* Skip CVMX_BOARD_TYPE_ */
|
||||
static inline const char *cvmx_board_type_to_string(enum
|
||||
cvmx_board_types_enum type)
|
||||
{
|
||||
|
|
@ -410,7 +410,7 @@ static inline const char *cvmx_board_type_to_string(enum
|
|||
}
|
||||
|
||||
#define ENUM_CHIP_TYPE_CASE(x) \
|
||||
case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
|
||||
case x: return (&#x[15]); /* Skip CVMX_CHIP_TYPE */
|
||||
static inline const char *cvmx_chip_type_to_string(enum
|
||||
cvmx_chip_types_enum type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@
|
|||
|
||||
|
||||
/*
|
||||
* Bank Address Address Bits Register (Table 6-22)
|
||||
* Bank Address Bits Register (Table 6-22)
|
||||
*/
|
||||
|
||||
#define S_MC_BA_RESERVED 0
|
||||
|
|
|
|||
|
|
@ -101,6 +101,9 @@ static inline int register_vsmp_smp_ops(void)
|
|||
#ifdef CONFIG_MIPS_MT_SMP
|
||||
extern const struct plat_smp_ops vsmp_smp_ops;
|
||||
|
||||
if (!cpu_has_mipsmt)
|
||||
return -ENODEV;
|
||||
|
||||
register_smp_ops(&vsmp_smp_ops);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -6,9 +6,3 @@ BOARD_VEC(jmr3927_vec)
|
|||
BOARD_VEC(rbtx4927_vec)
|
||||
BOARD_VEC(rbtx4937_vec)
|
||||
#endif
|
||||
#ifdef CONFIG_TOSHIBA_RBTX4938
|
||||
BOARD_VEC(rbtx4938_vec)
|
||||
#endif
|
||||
#ifdef CONFIG_TOSHIBA_RBTX4939
|
||||
BOARD_VEC(rbtx4939_vec)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,145 +0,0 @@
|
|||
/*
|
||||
* Definitions for TX4937/TX4938
|
||||
*
|
||||
* 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
|
||||
* terms of the GNU General Public License version 2. This program is
|
||||
* licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*
|
||||
* Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
|
||||
*/
|
||||
#ifndef __ASM_TXX9_RBTX4938_H
|
||||
#define __ASM_TXX9_RBTX4938_H
|
||||
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/txx9irq.h>
|
||||
#include <asm/txx9/tx4938.h>
|
||||
|
||||
/* Address map */
|
||||
#define RBTX4938_FPGA_REG_ADDR (IO_BASE + TXX9_CE(2) + 0x00000000)
|
||||
#define RBTX4938_FPGA_REV_ADDR (IO_BASE + TXX9_CE(2) + 0x00000002)
|
||||
#define RBTX4938_CONFIG1_ADDR (IO_BASE + TXX9_CE(2) + 0x00000004)
|
||||
#define RBTX4938_CONFIG2_ADDR (IO_BASE + TXX9_CE(2) + 0x00000006)
|
||||
#define RBTX4938_CONFIG3_ADDR (IO_BASE + TXX9_CE(2) + 0x00000008)
|
||||
#define RBTX4938_LED_ADDR (IO_BASE + TXX9_CE(2) + 0x00001000)
|
||||
#define RBTX4938_DIPSW_ADDR (IO_BASE + TXX9_CE(2) + 0x00001002)
|
||||
#define RBTX4938_BDIPSW_ADDR (IO_BASE + TXX9_CE(2) + 0x00001004)
|
||||
#define RBTX4938_IMASK_ADDR (IO_BASE + TXX9_CE(2) + 0x00002000)
|
||||
#define RBTX4938_IMASK2_ADDR (IO_BASE + TXX9_CE(2) + 0x00002002)
|
||||
#define RBTX4938_INTPOL_ADDR (IO_BASE + TXX9_CE(2) + 0x00002004)
|
||||
#define RBTX4938_ISTAT_ADDR (IO_BASE + TXX9_CE(2) + 0x00002006)
|
||||
#define RBTX4938_ISTAT2_ADDR (IO_BASE + TXX9_CE(2) + 0x00002008)
|
||||
#define RBTX4938_IMSTAT_ADDR (IO_BASE + TXX9_CE(2) + 0x0000200a)
|
||||
#define RBTX4938_IMSTAT2_ADDR (IO_BASE + TXX9_CE(2) + 0x0000200c)
|
||||
#define RBTX4938_SOFTINT_ADDR (IO_BASE + TXX9_CE(2) + 0x00003000)
|
||||
#define RBTX4938_PIOSEL_ADDR (IO_BASE + TXX9_CE(2) + 0x00005000)
|
||||
#define RBTX4938_SPICS_ADDR (IO_BASE + TXX9_CE(2) + 0x00005002)
|
||||
#define RBTX4938_SFPWR_ADDR (IO_BASE + TXX9_CE(2) + 0x00005008)
|
||||
#define RBTX4938_SFVOL_ADDR (IO_BASE + TXX9_CE(2) + 0x0000500a)
|
||||
#define RBTX4938_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x00007000)
|
||||
#define RBTX4938_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x00007002)
|
||||
#define RBTX4938_PCIRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x00007004)
|
||||
#define RBTX4938_ETHER_BASE (IO_BASE + TXX9_CE(2) + 0x00020000)
|
||||
|
||||
/* Ethernet port address (Jumperless Mode (W12:Open)) */
|
||||
#define RBTX4938_ETHER_ADDR (RBTX4938_ETHER_BASE + 0x280)
|
||||
|
||||
/* bits for ISTAT/IMASK/IMSTAT */
|
||||
#define RBTX4938_INTB_PCID 0
|
||||
#define RBTX4938_INTB_PCIC 1
|
||||
#define RBTX4938_INTB_PCIB 2
|
||||
#define RBTX4938_INTB_PCIA 3
|
||||
#define RBTX4938_INTB_RTC 4
|
||||
#define RBTX4938_INTB_ATA 5
|
||||
#define RBTX4938_INTB_MODEM 6
|
||||
#define RBTX4938_INTB_SWINT 7
|
||||
#define RBTX4938_INTF_PCID (1 << RBTX4938_INTB_PCID)
|
||||
#define RBTX4938_INTF_PCIC (1 << RBTX4938_INTB_PCIC)
|
||||
#define RBTX4938_INTF_PCIB (1 << RBTX4938_INTB_PCIB)
|
||||
#define RBTX4938_INTF_PCIA (1 << RBTX4938_INTB_PCIA)
|
||||
#define RBTX4938_INTF_RTC (1 << RBTX4938_INTB_RTC)
|
||||
#define RBTX4938_INTF_ATA (1 << RBTX4938_INTB_ATA)
|
||||
#define RBTX4938_INTF_MODEM (1 << RBTX4938_INTB_MODEM)
|
||||
#define RBTX4938_INTF_SWINT (1 << RBTX4938_INTB_SWINT)
|
||||
|
||||
#define rbtx4938_fpga_rev_addr ((__u8 __iomem *)RBTX4938_FPGA_REV_ADDR)
|
||||
#define rbtx4938_led_addr ((__u8 __iomem *)RBTX4938_LED_ADDR)
|
||||
#define rbtx4938_dipsw_addr ((__u8 __iomem *)RBTX4938_DIPSW_ADDR)
|
||||
#define rbtx4938_bdipsw_addr ((__u8 __iomem *)RBTX4938_BDIPSW_ADDR)
|
||||
#define rbtx4938_imask_addr ((__u8 __iomem *)RBTX4938_IMASK_ADDR)
|
||||
#define rbtx4938_imask2_addr ((__u8 __iomem *)RBTX4938_IMASK2_ADDR)
|
||||
#define rbtx4938_intpol_addr ((__u8 __iomem *)RBTX4938_INTPOL_ADDR)
|
||||
#define rbtx4938_istat_addr ((__u8 __iomem *)RBTX4938_ISTAT_ADDR)
|
||||
#define rbtx4938_istat2_addr ((__u8 __iomem *)RBTX4938_ISTAT2_ADDR)
|
||||
#define rbtx4938_imstat_addr ((__u8 __iomem *)RBTX4938_IMSTAT_ADDR)
|
||||
#define rbtx4938_imstat2_addr ((__u8 __iomem *)RBTX4938_IMSTAT2_ADDR)
|
||||
#define rbtx4938_softint_addr ((__u8 __iomem *)RBTX4938_SOFTINT_ADDR)
|
||||
#define rbtx4938_piosel_addr ((__u8 __iomem *)RBTX4938_PIOSEL_ADDR)
|
||||
#define rbtx4938_spics_addr ((__u8 __iomem *)RBTX4938_SPICS_ADDR)
|
||||
#define rbtx4938_sfpwr_addr ((__u8 __iomem *)RBTX4938_SFPWR_ADDR)
|
||||
#define rbtx4938_sfvol_addr ((__u8 __iomem *)RBTX4938_SFVOL_ADDR)
|
||||
#define rbtx4938_softreset_addr ((__u8 __iomem *)RBTX4938_SOFTRESET_ADDR)
|
||||
#define rbtx4938_softresetlock_addr \
|
||||
((__u8 __iomem *)RBTX4938_SOFTRESETLOCK_ADDR)
|
||||
#define rbtx4938_pcireset_addr ((__u8 __iomem *)RBTX4938_PCIRESET_ADDR)
|
||||
|
||||
/*
|
||||
* IRQ mappings
|
||||
*/
|
||||
|
||||
#define RBTX4938_SOFT_INT0 0 /* not used */
|
||||
#define RBTX4938_SOFT_INT1 1 /* not used */
|
||||
#define RBTX4938_IRC_INT 2
|
||||
#define RBTX4938_TIMER_INT 7
|
||||
|
||||
/* These are the virtual IRQ numbers, we divide all IRQ's into
|
||||
* 'spaces', the 'space' determines where and how to enable/disable
|
||||
* that particular IRQ on an RBTX4938 machine. Add new 'spaces' as new
|
||||
* IRQ hardware is supported.
|
||||
*/
|
||||
#define RBTX4938_NR_IRQ_IOC 8
|
||||
|
||||
#define RBTX4938_IRQ_IRC TXX9_IRQ_BASE
|
||||
#define RBTX4938_IRQ_IOC (TXX9_IRQ_BASE + TX4938_NUM_IR)
|
||||
#define RBTX4938_IRQ_END (RBTX4938_IRQ_IOC + RBTX4938_NR_IRQ_IOC)
|
||||
|
||||
#define RBTX4938_IRQ_IRC_ECCERR (RBTX4938_IRQ_IRC + TX4938_IR_ECCERR)
|
||||
#define RBTX4938_IRQ_IRC_WTOERR (RBTX4938_IRQ_IRC + TX4938_IR_WTOERR)
|
||||
#define RBTX4938_IRQ_IRC_INT(n) (RBTX4938_IRQ_IRC + TX4938_IR_INT(n))
|
||||
#define RBTX4938_IRQ_IRC_SIO(n) (RBTX4938_IRQ_IRC + TX4938_IR_SIO(n))
|
||||
#define RBTX4938_IRQ_IRC_DMA(ch, n) (RBTX4938_IRQ_IRC + TX4938_IR_DMA(ch, n))
|
||||
#define RBTX4938_IRQ_IRC_PIO (RBTX4938_IRQ_IRC + TX4938_IR_PIO)
|
||||
#define RBTX4938_IRQ_IRC_PDMAC (RBTX4938_IRQ_IRC + TX4938_IR_PDMAC)
|
||||
#define RBTX4938_IRQ_IRC_PCIC (RBTX4938_IRQ_IRC + TX4938_IR_PCIC)
|
||||
#define RBTX4938_IRQ_IRC_TMR(n) (RBTX4938_IRQ_IRC + TX4938_IR_TMR(n))
|
||||
#define RBTX4938_IRQ_IRC_NDFMC (RBTX4938_IRQ_IRC + TX4938_IR_NDFMC)
|
||||
#define RBTX4938_IRQ_IRC_PCIERR (RBTX4938_IRQ_IRC + TX4938_IR_PCIERR)
|
||||
#define RBTX4938_IRQ_IRC_PCIPME (RBTX4938_IRQ_IRC + TX4938_IR_PCIPME)
|
||||
#define RBTX4938_IRQ_IRC_ACLC (RBTX4938_IRQ_IRC + TX4938_IR_ACLC)
|
||||
#define RBTX4938_IRQ_IRC_ACLCPME (RBTX4938_IRQ_IRC + TX4938_IR_ACLCPME)
|
||||
#define RBTX4938_IRQ_IRC_PCIC1 (RBTX4938_IRQ_IRC + TX4938_IR_PCIC1)
|
||||
#define RBTX4938_IRQ_IRC_SPI (RBTX4938_IRQ_IRC + TX4938_IR_SPI)
|
||||
#define RBTX4938_IRQ_IOC_PCID (RBTX4938_IRQ_IOC + RBTX4938_INTB_PCID)
|
||||
#define RBTX4938_IRQ_IOC_PCIC (RBTX4938_IRQ_IOC + RBTX4938_INTB_PCIC)
|
||||
#define RBTX4938_IRQ_IOC_PCIB (RBTX4938_IRQ_IOC + RBTX4938_INTB_PCIB)
|
||||
#define RBTX4938_IRQ_IOC_PCIA (RBTX4938_IRQ_IOC + RBTX4938_INTB_PCIA)
|
||||
#define RBTX4938_IRQ_IOC_RTC (RBTX4938_IRQ_IOC + RBTX4938_INTB_RTC)
|
||||
#define RBTX4938_IRQ_IOC_ATA (RBTX4938_IRQ_IOC + RBTX4938_INTB_ATA)
|
||||
#define RBTX4938_IRQ_IOC_MODEM (RBTX4938_IRQ_IOC + RBTX4938_INTB_MODEM)
|
||||
#define RBTX4938_IRQ_IOC_SWINT (RBTX4938_IRQ_IOC + RBTX4938_INTB_SWINT)
|
||||
|
||||
|
||||
/* IOC (PCI, etc) */
|
||||
#define RBTX4938_IRQ_IOCINT (TXX9_IRQ_BASE + TX4938_IR_INT(0))
|
||||
/* Onboard 10M Ether */
|
||||
#define RBTX4938_IRQ_ETHER (TXX9_IRQ_BASE + TX4938_IR_INT(1))
|
||||
|
||||
#define RBTX4938_RTL_8019_BASE (RBTX4938_ETHER_ADDR - mips_io_port_base)
|
||||
#define RBTX4938_RTL_8019_IRQ (RBTX4938_IRQ_ETHER)
|
||||
|
||||
void rbtx4938_prom_init(void);
|
||||
void rbtx4938_irq_setup(void);
|
||||
struct pci_dev;
|
||||
int rbtx4938_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
|
||||
|
||||
#endif /* __ASM_TXX9_RBTX4938_H */
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
/*
|
||||
* Definitions for RBTX4939
|
||||
*
|
||||
* (C) Copyright TOSHIBA CORPORATION 2005-2006
|
||||
* 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
|
||||
* terms of the GNU General Public License version 2. This program is
|
||||
* licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*/
|
||||
#ifndef __ASM_TXX9_RBTX4939_H
|
||||
#define __ASM_TXX9_RBTX4939_H
|
||||
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/txx9irq.h>
|
||||
#include <asm/txx9/generic.h>
|
||||
#include <asm/txx9/tx4939.h>
|
||||
|
||||
/* Address map */
|
||||
#define RBTX4939_IOC_REG_ADDR (IO_BASE + TXX9_CE(1) + 0x00000000)
|
||||
#define RBTX4939_BOARD_REV_ADDR (IO_BASE + TXX9_CE(1) + 0x00000000)
|
||||
#define RBTX4939_IOC_REV_ADDR (IO_BASE + TXX9_CE(1) + 0x00000002)
|
||||
#define RBTX4939_CONFIG1_ADDR (IO_BASE + TXX9_CE(1) + 0x00000004)
|
||||
#define RBTX4939_CONFIG2_ADDR (IO_BASE + TXX9_CE(1) + 0x00000006)
|
||||
#define RBTX4939_CONFIG3_ADDR (IO_BASE + TXX9_CE(1) + 0x00000008)
|
||||
#define RBTX4939_CONFIG4_ADDR (IO_BASE + TXX9_CE(1) + 0x0000000a)
|
||||
#define RBTX4939_USTAT_ADDR (IO_BASE + TXX9_CE(1) + 0x00001000)
|
||||
#define RBTX4939_UDIPSW_ADDR (IO_BASE + TXX9_CE(1) + 0x00001002)
|
||||
#define RBTX4939_BDIPSW_ADDR (IO_BASE + TXX9_CE(1) + 0x00001004)
|
||||
#define RBTX4939_IEN_ADDR (IO_BASE + TXX9_CE(1) + 0x00002000)
|
||||
#define RBTX4939_IPOL_ADDR (IO_BASE + TXX9_CE(1) + 0x00002002)
|
||||
#define RBTX4939_IFAC1_ADDR (IO_BASE + TXX9_CE(1) + 0x00002004)
|
||||
#define RBTX4939_IFAC2_ADDR (IO_BASE + TXX9_CE(1) + 0x00002006)
|
||||
#define RBTX4939_SOFTINT_ADDR (IO_BASE + TXX9_CE(1) + 0x00003000)
|
||||
#define RBTX4939_ISASTAT_ADDR (IO_BASE + TXX9_CE(1) + 0x00004000)
|
||||
#define RBTX4939_PCISTAT_ADDR (IO_BASE + TXX9_CE(1) + 0x00004002)
|
||||
#define RBTX4939_ROME_ADDR (IO_BASE + TXX9_CE(1) + 0x00004004)
|
||||
#define RBTX4939_SPICS_ADDR (IO_BASE + TXX9_CE(1) + 0x00004006)
|
||||
#define RBTX4939_AUDI_ADDR (IO_BASE + TXX9_CE(1) + 0x00004008)
|
||||
#define RBTX4939_ISAGPIO_ADDR (IO_BASE + TXX9_CE(1) + 0x0000400a)
|
||||
#define RBTX4939_PE1_ADDR (IO_BASE + TXX9_CE(1) + 0x00005000)
|
||||
#define RBTX4939_PE2_ADDR (IO_BASE + TXX9_CE(1) + 0x00005002)
|
||||
#define RBTX4939_PE3_ADDR (IO_BASE + TXX9_CE(1) + 0x00005004)
|
||||
#define RBTX4939_VP_ADDR (IO_BASE + TXX9_CE(1) + 0x00005006)
|
||||
#define RBTX4939_VPRESET_ADDR (IO_BASE + TXX9_CE(1) + 0x00005008)
|
||||
#define RBTX4939_VPSOUT_ADDR (IO_BASE + TXX9_CE(1) + 0x0000500a)
|
||||
#define RBTX4939_VPSIN_ADDR (IO_BASE + TXX9_CE(1) + 0x0000500c)
|
||||
#define RBTX4939_7SEG_ADDR(s, ch) \
|
||||
(IO_BASE + TXX9_CE(1) + 0x00006000 + (s) * 16 + ((ch) & 3) * 2)
|
||||
#define RBTX4939_SOFTRESET_ADDR (IO_BASE + TXX9_CE(1) + 0x00007000)
|
||||
#define RBTX4939_RESETEN_ADDR (IO_BASE + TXX9_CE(1) + 0x00007002)
|
||||
#define RBTX4939_RESETSTAT_ADDR (IO_BASE + TXX9_CE(1) + 0x00007004)
|
||||
#define RBTX4939_ETHER_BASE (IO_BASE + TXX9_CE(1) + 0x00020000)
|
||||
|
||||
/* Ethernet port address */
|
||||
#define RBTX4939_ETHER_ADDR (RBTX4939_ETHER_BASE + 0x300)
|
||||
|
||||
/* bits for IEN/IPOL/IFAC */
|
||||
#define RBTX4938_INTB_ISA0 0
|
||||
#define RBTX4938_INTB_ISA11 1
|
||||
#define RBTX4938_INTB_ISA12 2
|
||||
#define RBTX4938_INTB_ISA15 3
|
||||
#define RBTX4938_INTB_I2S 4
|
||||
#define RBTX4938_INTB_SW 5
|
||||
#define RBTX4938_INTF_ISA0 (1 << RBTX4938_INTB_ISA0)
|
||||
#define RBTX4938_INTF_ISA11 (1 << RBTX4938_INTB_ISA11)
|
||||
#define RBTX4938_INTF_ISA12 (1 << RBTX4938_INTB_ISA12)
|
||||
#define RBTX4938_INTF_ISA15 (1 << RBTX4938_INTB_ISA15)
|
||||
#define RBTX4938_INTF_I2S (1 << RBTX4938_INTB_I2S)
|
||||
#define RBTX4938_INTF_SW (1 << RBTX4938_INTB_SW)
|
||||
|
||||
/* bits for PE1,PE2,PE3 */
|
||||
#define RBTX4939_PE1_ATA(ch) (0x01 << (ch))
|
||||
#define RBTX4939_PE1_RMII(ch) (0x04 << (ch))
|
||||
#define RBTX4939_PE2_SIO0 0x01
|
||||
#define RBTX4939_PE2_SIO2 0x02
|
||||
#define RBTX4939_PE2_SIO3 0x04
|
||||
#define RBTX4939_PE2_CIR 0x08
|
||||
#define RBTX4939_PE2_SPI 0x10
|
||||
#define RBTX4939_PE2_GPIO 0x20
|
||||
#define RBTX4939_PE3_VP 0x01
|
||||
#define RBTX4939_PE3_VP_P 0x02
|
||||
#define RBTX4939_PE3_VP_S 0x04
|
||||
|
||||
#define rbtx4939_board_rev_addr ((u8 __iomem *)RBTX4939_BOARD_REV_ADDR)
|
||||
#define rbtx4939_ioc_rev_addr ((u8 __iomem *)RBTX4939_IOC_REV_ADDR)
|
||||
#define rbtx4939_config1_addr ((u8 __iomem *)RBTX4939_CONFIG1_ADDR)
|
||||
#define rbtx4939_config2_addr ((u8 __iomem *)RBTX4939_CONFIG2_ADDR)
|
||||
#define rbtx4939_config3_addr ((u8 __iomem *)RBTX4939_CONFIG3_ADDR)
|
||||
#define rbtx4939_config4_addr ((u8 __iomem *)RBTX4939_CONFIG4_ADDR)
|
||||
#define rbtx4939_ustat_addr ((u8 __iomem *)RBTX4939_USTAT_ADDR)
|
||||
#define rbtx4939_udipsw_addr ((u8 __iomem *)RBTX4939_UDIPSW_ADDR)
|
||||
#define rbtx4939_bdipsw_addr ((u8 __iomem *)RBTX4939_BDIPSW_ADDR)
|
||||
#define rbtx4939_ien_addr ((u8 __iomem *)RBTX4939_IEN_ADDR)
|
||||
#define rbtx4939_ipol_addr ((u8 __iomem *)RBTX4939_IPOL_ADDR)
|
||||
#define rbtx4939_ifac1_addr ((u8 __iomem *)RBTX4939_IFAC1_ADDR)
|
||||
#define rbtx4939_ifac2_addr ((u8 __iomem *)RBTX4939_IFAC2_ADDR)
|
||||
#define rbtx4939_softint_addr ((u8 __iomem *)RBTX4939_SOFTINT_ADDR)
|
||||
#define rbtx4939_isastat_addr ((u8 __iomem *)RBTX4939_ISASTAT_ADDR)
|
||||
#define rbtx4939_pcistat_addr ((u8 __iomem *)RBTX4939_PCISTAT_ADDR)
|
||||
#define rbtx4939_rome_addr ((u8 __iomem *)RBTX4939_ROME_ADDR)
|
||||
#define rbtx4939_spics_addr ((u8 __iomem *)RBTX4939_SPICS_ADDR)
|
||||
#define rbtx4939_audi_addr ((u8 __iomem *)RBTX4939_AUDI_ADDR)
|
||||
#define rbtx4939_isagpio_addr ((u8 __iomem *)RBTX4939_ISAGPIO_ADDR)
|
||||
#define rbtx4939_pe1_addr ((u8 __iomem *)RBTX4939_PE1_ADDR)
|
||||
#define rbtx4939_pe2_addr ((u8 __iomem *)RBTX4939_PE2_ADDR)
|
||||
#define rbtx4939_pe3_addr ((u8 __iomem *)RBTX4939_PE3_ADDR)
|
||||
#define rbtx4939_vp_addr ((u8 __iomem *)RBTX4939_VP_ADDR)
|
||||
#define rbtx4939_vpreset_addr ((u8 __iomem *)RBTX4939_VPRESET_ADDR)
|
||||
#define rbtx4939_vpsout_addr ((u8 __iomem *)RBTX4939_VPSOUT_ADDR)
|
||||
#define rbtx4939_vpsin_addr ((u8 __iomem *)RBTX4939_VPSIN_ADDR)
|
||||
#define rbtx4939_7seg_addr(s, ch) \
|
||||
((u8 __iomem *)RBTX4939_7SEG_ADDR(s, ch))
|
||||
#define rbtx4939_softreset_addr ((u8 __iomem *)RBTX4939_SOFTRESET_ADDR)
|
||||
#define rbtx4939_reseten_addr ((u8 __iomem *)RBTX4939_RESETEN_ADDR)
|
||||
#define rbtx4939_resetstat_addr ((u8 __iomem *)RBTX4939_RESETSTAT_ADDR)
|
||||
|
||||
/*
|
||||
* IRQ mappings
|
||||
*/
|
||||
#define RBTX4939_NR_IRQ_IOC 8
|
||||
|
||||
#define RBTX4939_IRQ_IOC (TXX9_IRQ_BASE + TX4939_NUM_IR)
|
||||
#define RBTX4939_IRQ_END (RBTX4939_IRQ_IOC + RBTX4939_NR_IRQ_IOC)
|
||||
|
||||
/* IOC (ISA, etc) */
|
||||
#define RBTX4939_IRQ_IOCINT (TXX9_IRQ_BASE + TX4939_IR_INT(0))
|
||||
/* Onboard 10M Ether */
|
||||
#define RBTX4939_IRQ_ETHER (TXX9_IRQ_BASE + TX4939_IR_INT(1))
|
||||
|
||||
void rbtx4939_prom_init(void);
|
||||
void rbtx4939_irq_setup(void);
|
||||
|
||||
struct mtd_partition;
|
||||
struct map_info;
|
||||
struct rbtx4939_flash_data {
|
||||
unsigned int width;
|
||||
unsigned int nr_parts;
|
||||
struct mtd_partition *parts;
|
||||
void (*map_init)(struct map_info *map);
|
||||
};
|
||||
|
||||
#endif /* __ASM_TXX9_RBTX4939_H */
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Definitions for TX4937/TX4938 SPI
|
||||
*
|
||||
* Copyright (C) 2000-2001 Toshiba Corporation
|
||||
*
|
||||
* 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
|
||||
* terms of the GNU General Public License version 2. This program is
|
||||
* licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*
|
||||
* Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
|
||||
*/
|
||||
#ifndef __ASM_TXX9_SPI_H
|
||||
#define __ASM_TXX9_SPI_H
|
||||
|
||||
#include <linux/errno.h>
|
||||
|
||||
#ifdef CONFIG_SPI
|
||||
int spi_eeprom_register(int busid, int chipid, int size);
|
||||
int spi_eeprom_read(int busid, int chipid,
|
||||
int address, unsigned char *buf, int len);
|
||||
#else
|
||||
static inline int spi_eeprom_register(int busid, int chipid, int size)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline int spi_eeprom_read(int busid, int chipid,
|
||||
int address, unsigned char *buf, int len)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_TXX9_SPI_H */
|
||||
|
|
@ -1,524 +0,0 @@
|
|||
/*
|
||||
* Definitions for TX4939
|
||||
*
|
||||
* Copyright (C) 2000-2001,2005-2006 Toshiba Corporation
|
||||
* 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
|
||||
* terms of the GNU General Public License version 2. This program is
|
||||
* licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*/
|
||||
#ifndef __ASM_TXX9_TX4939_H
|
||||
#define __ASM_TXX9_TX4939_H
|
||||
|
||||
/* some controllers are compatible with 4927/4938 */
|
||||
#include <asm/txx9/tx4938.h>
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define TX4939_REG_BASE 0xffffffffff1f0000UL /* == TX4938_REG_BASE */
|
||||
#else
|
||||
#define TX4939_REG_BASE 0xff1f0000UL /* == TX4938_REG_BASE */
|
||||
#endif
|
||||
#define TX4939_REG_SIZE 0x00010000 /* == TX4938_REG_SIZE */
|
||||
|
||||
#define TX4939_ATA_REG(ch) (TX4939_REG_BASE + 0x3000 + (ch) * 0x1000)
|
||||
#define TX4939_NDFMC_REG (TX4939_REG_BASE + 0x5000)
|
||||
#define TX4939_SRAMC_REG (TX4939_REG_BASE + 0x6000)
|
||||
#define TX4939_CRYPTO_REG (TX4939_REG_BASE + 0x6800)
|
||||
#define TX4939_PCIC1_REG (TX4939_REG_BASE + 0x7000)
|
||||
#define TX4939_DDRC_REG (TX4939_REG_BASE + 0x8000)
|
||||
#define TX4939_EBUSC_REG (TX4939_REG_BASE + 0x9000)
|
||||
#define TX4939_VPC_REG (TX4939_REG_BASE + 0xa000)
|
||||
#define TX4939_DMA_REG(ch) (TX4939_REG_BASE + 0xb000 + (ch) * 0x800)
|
||||
#define TX4939_PCIC_REG (TX4939_REG_BASE + 0xd000)
|
||||
#define TX4939_CCFG_REG (TX4939_REG_BASE + 0xe000)
|
||||
#define TX4939_IRC_REG (TX4939_REG_BASE + 0xe800)
|
||||
#define TX4939_NR_TMR 6 /* 0xf000,0xf100,0xf200,0xfd00,0xfe00,0xff00 */
|
||||
#define TX4939_TMR_REG(ch) \
|
||||
(TX4939_REG_BASE + 0xf000 + ((ch) + ((ch) >= 3) * 10) * 0x100)
|
||||
#define TX4939_NR_SIO 4 /* 0xf300, 0xf400, 0xf380, 0xf480 */
|
||||
#define TX4939_SIO_REG(ch) \
|
||||
(TX4939_REG_BASE + 0xf300 + (((ch) & 1) << 8) + (((ch) & 2) << 6))
|
||||
#define TX4939_ACLC_REG (TX4939_REG_BASE + 0xf700)
|
||||
#define TX4939_SPI_REG (TX4939_REG_BASE + 0xf800)
|
||||
#define TX4939_I2C_REG (TX4939_REG_BASE + 0xf900)
|
||||
#define TX4939_I2S_REG (TX4939_REG_BASE + 0xfa00)
|
||||
#define TX4939_RTC_REG (TX4939_REG_BASE + 0xfb00)
|
||||
#define TX4939_CIR_REG (TX4939_REG_BASE + 0xfc00)
|
||||
|
||||
#define TX4939_RNG_REG (TX4939_CRYPTO_REG + 0xb0)
|
||||
|
||||
struct tx4939_le_reg {
|
||||
__u32 r;
|
||||
__u32 unused;
|
||||
};
|
||||
|
||||
struct tx4939_ddrc_reg {
|
||||
struct tx4939_le_reg ctl[47];
|
||||
__u64 unused0[17];
|
||||
__u64 winen;
|
||||
__u64 win[4];
|
||||
};
|
||||
|
||||
struct tx4939_ccfg_reg {
|
||||
__u64 ccfg;
|
||||
__u64 crir;
|
||||
__u64 pcfg;
|
||||
__u64 toea;
|
||||
__u64 clkctr;
|
||||
__u64 unused0;
|
||||
__u64 garbc;
|
||||
__u64 unused1[2];
|
||||
__u64 ramp;
|
||||
__u64 unused2[2];
|
||||
__u64 dskwctrl;
|
||||
__u64 mclkosc;
|
||||
__u64 mclkctl;
|
||||
__u64 unused3[17];
|
||||
struct {
|
||||
__u64 mr;
|
||||
__u64 dr;
|
||||
} gpio[2];
|
||||
};
|
||||
|
||||
struct tx4939_irc_reg {
|
||||
struct tx4939_le_reg den;
|
||||
struct tx4939_le_reg scipb;
|
||||
struct tx4939_le_reg dm[2];
|
||||
struct tx4939_le_reg lvl[16];
|
||||
struct tx4939_le_reg msk;
|
||||
struct tx4939_le_reg edc;
|
||||
struct tx4939_le_reg pnd0;
|
||||
struct tx4939_le_reg cs;
|
||||
struct tx4939_le_reg pnd1;
|
||||
struct tx4939_le_reg dm2[2];
|
||||
struct tx4939_le_reg dbr[2];
|
||||
struct tx4939_le_reg dben;
|
||||
struct tx4939_le_reg unused0[2];
|
||||
struct tx4939_le_reg flag[2];
|
||||
struct tx4939_le_reg pol;
|
||||
struct tx4939_le_reg cnt;
|
||||
struct tx4939_le_reg maskint;
|
||||
struct tx4939_le_reg maskext;
|
||||
};
|
||||
|
||||
struct tx4939_crypto_reg {
|
||||
struct tx4939_le_reg csr;
|
||||
struct tx4939_le_reg idesptr;
|
||||
struct tx4939_le_reg cdesptr;
|
||||
struct tx4939_le_reg buserr;
|
||||
struct tx4939_le_reg cip_tout;
|
||||
struct tx4939_le_reg cir;
|
||||
union {
|
||||
struct {
|
||||
struct tx4939_le_reg data[8];
|
||||
struct tx4939_le_reg ctrl;
|
||||
} gen;
|
||||
struct {
|
||||
struct {
|
||||
struct tx4939_le_reg l;
|
||||
struct tx4939_le_reg u;
|
||||
} key[3], ini;
|
||||
struct tx4939_le_reg ctrl;
|
||||
} des;
|
||||
struct {
|
||||
struct tx4939_le_reg key[4];
|
||||
struct tx4939_le_reg ini[4];
|
||||
struct tx4939_le_reg ctrl;
|
||||
} aes;
|
||||
struct {
|
||||
struct {
|
||||
struct tx4939_le_reg l;
|
||||
struct tx4939_le_reg u;
|
||||
} cnt;
|
||||
struct tx4939_le_reg ini[5];
|
||||
struct tx4939_le_reg unused;
|
||||
struct tx4939_le_reg ctrl;
|
||||
} hash;
|
||||
} cdr;
|
||||
struct tx4939_le_reg unused0[7];
|
||||
struct tx4939_le_reg rcsr;
|
||||
struct tx4939_le_reg rpr;
|
||||
__u64 rdr;
|
||||
__u64 ror[3];
|
||||
struct tx4939_le_reg unused1[2];
|
||||
struct tx4939_le_reg xorslr;
|
||||
struct tx4939_le_reg xorsur;
|
||||
};
|
||||
|
||||
struct tx4939_crypto_desc {
|
||||
__u32 src;
|
||||
__u32 dst;
|
||||
__u32 next;
|
||||
__u32 ctrl;
|
||||
__u32 index;
|
||||
__u32 xor;
|
||||
};
|
||||
|
||||
struct tx4939_vpc_reg {
|
||||
struct tx4939_le_reg csr;
|
||||
struct {
|
||||
struct tx4939_le_reg ctrlA;
|
||||
struct tx4939_le_reg ctrlB;
|
||||
struct tx4939_le_reg idesptr;
|
||||
struct tx4939_le_reg cdesptr;
|
||||
} port[3];
|
||||
struct tx4939_le_reg buserr;
|
||||
};
|
||||
|
||||
struct tx4939_vpc_desc {
|
||||
__u32 src;
|
||||
__u32 next;
|
||||
__u32 ctrl1;
|
||||
__u32 ctrl2;
|
||||
};
|
||||
|
||||
/*
|
||||
* IRC
|
||||
*/
|
||||
#define TX4939_IR_NONE 0
|
||||
#define TX4939_IR_DDR 1
|
||||
#define TX4939_IR_WTOERR 2
|
||||
#define TX4939_NUM_IR_INT 3
|
||||
#define TX4939_IR_INT(n) (3 + (n))
|
||||
#define TX4939_NUM_IR_ETH 2
|
||||
#define TX4939_IR_ETH(n) ((n) ? 43 : 6)
|
||||
#define TX4939_IR_VIDEO 7
|
||||
#define TX4939_IR_CIR 8
|
||||
#define TX4939_NUM_IR_SIO 4
|
||||
#define TX4939_IR_SIO(n) ((n) ? 43 + (n) : 9) /* 9,44-46 */
|
||||
#define TX4939_NUM_IR_DMA 4
|
||||
#define TX4939_IR_DMA(ch, n) (((ch) ? 22 : 10) + (n)) /* 10-13,22-25 */
|
||||
#define TX4939_IR_IRC 14
|
||||
#define TX4939_IR_PDMAC 15
|
||||
#define TX4939_NUM_IR_TMR 6
|
||||
#define TX4939_IR_TMR(n) (((n) >= 3 ? 45 : 16) + (n)) /* 16-18,48-50 */
|
||||
#define TX4939_NUM_IR_ATA 2
|
||||
#define TX4939_IR_ATA(n) (19 + (n))
|
||||
#define TX4939_IR_ACLC 21
|
||||
#define TX4939_IR_CIPHER 26
|
||||
#define TX4939_IR_INTA 27
|
||||
#define TX4939_IR_INTB 28
|
||||
#define TX4939_IR_INTC 29
|
||||
#define TX4939_IR_INTD 30
|
||||
#define TX4939_IR_I2C 33
|
||||
#define TX4939_IR_SPI 34
|
||||
#define TX4939_IR_PCIC 35
|
||||
#define TX4939_IR_PCIC1 36
|
||||
#define TX4939_IR_PCIERR 37
|
||||
#define TX4939_IR_PCIPME 38
|
||||
#define TX4939_IR_NDFMC 39
|
||||
#define TX4939_IR_ACLCPME 40
|
||||
#define TX4939_IR_RTC 41
|
||||
#define TX4939_IR_RND 42
|
||||
#define TX4939_IR_I2S 47
|
||||
#define TX4939_NUM_IR 64
|
||||
|
||||
#define TX4939_IRC_INT 2 /* IP[2] in Status register */
|
||||
|
||||
/*
|
||||
* CCFG
|
||||
*/
|
||||
/* CCFG : Chip Configuration */
|
||||
#define TX4939_CCFG_PCIBOOT 0x0000040000000000ULL
|
||||
#define TX4939_CCFG_WDRST 0x0000020000000000ULL
|
||||
#define TX4939_CCFG_WDREXEN 0x0000010000000000ULL
|
||||
#define TX4939_CCFG_BCFG_MASK 0x000000ff00000000ULL
|
||||
#define TX4939_CCFG_GTOT_MASK 0x06000000
|
||||
#define TX4939_CCFG_GTOT_4096 0x06000000
|
||||
#define TX4939_CCFG_GTOT_2048 0x04000000
|
||||
#define TX4939_CCFG_GTOT_1024 0x02000000
|
||||
#define TX4939_CCFG_GTOT_512 0x00000000
|
||||
#define TX4939_CCFG_TINTDIS 0x01000000
|
||||
#define TX4939_CCFG_PCI66 0x00800000
|
||||
#define TX4939_CCFG_PCIMODE 0x00400000
|
||||
#define TX4939_CCFG_SSCG 0x00100000
|
||||
#define TX4939_CCFG_MULCLK_MASK 0x000e0000
|
||||
#define TX4939_CCFG_MULCLK_8 (0x7 << 17)
|
||||
#define TX4939_CCFG_MULCLK_9 (0x0 << 17)
|
||||
#define TX4939_CCFG_MULCLK_10 (0x1 << 17)
|
||||
#define TX4939_CCFG_MULCLK_11 (0x2 << 17)
|
||||
#define TX4939_CCFG_MULCLK_12 (0x3 << 17)
|
||||
#define TX4939_CCFG_MULCLK_13 (0x4 << 17)
|
||||
#define TX4939_CCFG_MULCLK_14 (0x5 << 17)
|
||||
#define TX4939_CCFG_MULCLK_15 (0x6 << 17)
|
||||
#define TX4939_CCFG_BEOW 0x00010000
|
||||
#define TX4939_CCFG_WR 0x00008000
|
||||
#define TX4939_CCFG_TOE 0x00004000
|
||||
#define TX4939_CCFG_PCIARB 0x00002000
|
||||
#define TX4939_CCFG_YDIVMODE_MASK 0x00001c00
|
||||
#define TX4939_CCFG_YDIVMODE_2 (0x0 << 10)
|
||||
#define TX4939_CCFG_YDIVMODE_3 (0x1 << 10)
|
||||
#define TX4939_CCFG_YDIVMODE_5 (0x6 << 10)
|
||||
#define TX4939_CCFG_YDIVMODE_6 (0x7 << 10)
|
||||
#define TX4939_CCFG_PTSEL 0x00000200
|
||||
#define TX4939_CCFG_BESEL 0x00000100
|
||||
#define TX4939_CCFG_SYSSP_MASK 0x000000c0
|
||||
#define TX4939_CCFG_ACKSEL 0x00000020
|
||||
#define TX4939_CCFG_ROMW 0x00000010
|
||||
#define TX4939_CCFG_ENDIAN 0x00000004
|
||||
#define TX4939_CCFG_ARMODE 0x00000002
|
||||
#define TX4939_CCFG_ACEHOLD 0x00000001
|
||||
|
||||
/* PCFG : Pin Configuration */
|
||||
#define TX4939_PCFG_SIO2MODE_MASK 0xc000000000000000ULL
|
||||
#define TX4939_PCFG_SIO2MODE_GPIO 0x8000000000000000ULL
|
||||
#define TX4939_PCFG_SIO2MODE_SIO2 0x4000000000000000ULL
|
||||
#define TX4939_PCFG_SIO2MODE_SIO0 0x0000000000000000ULL
|
||||
#define TX4939_PCFG_SPIMODE 0x2000000000000000ULL
|
||||
#define TX4939_PCFG_I2CMODE 0x1000000000000000ULL
|
||||
#define TX4939_PCFG_I2SMODE_MASK 0x0c00000000000000ULL
|
||||
#define TX4939_PCFG_I2SMODE_GPIO 0x0c00000000000000ULL
|
||||
#define TX4939_PCFG_I2SMODE_I2S 0x0800000000000000ULL
|
||||
#define TX4939_PCFG_I2SMODE_I2S_ALT 0x0400000000000000ULL
|
||||
#define TX4939_PCFG_I2SMODE_ACLC 0x0000000000000000ULL
|
||||
#define TX4939_PCFG_SIO3MODE 0x0200000000000000ULL
|
||||
#define TX4939_PCFG_DMASEL3 0x0004000000000000ULL
|
||||
#define TX4939_PCFG_DMASEL3_SIO0 0x0004000000000000ULL
|
||||
#define TX4939_PCFG_DMASEL3_NDFC 0x0000000000000000ULL
|
||||
#define TX4939_PCFG_VSSMODE 0x0000200000000000ULL
|
||||
#define TX4939_PCFG_VPSMODE 0x0000100000000000ULL
|
||||
#define TX4939_PCFG_ET1MODE 0x0000080000000000ULL
|
||||
#define TX4939_PCFG_ET0MODE 0x0000040000000000ULL
|
||||
#define TX4939_PCFG_ATA1MODE 0x0000020000000000ULL
|
||||
#define TX4939_PCFG_ATA0MODE 0x0000010000000000ULL
|
||||
#define TX4939_PCFG_BP_PLL 0x0000000100000000ULL
|
||||
|
||||
#define TX4939_PCFG_SYSCLKEN 0x08000000
|
||||
#define TX4939_PCFG_PCICLKEN_ALL 0x000f0000
|
||||
#define TX4939_PCFG_PCICLKEN(ch) (0x00010000<<(ch))
|
||||
#define TX4939_PCFG_SPEED1 0x00002000
|
||||
#define TX4939_PCFG_SPEED0 0x00001000
|
||||
#define TX4939_PCFG_ITMODE 0x00000300
|
||||
#define TX4939_PCFG_DMASEL_ALL (0x00000007 | TX4939_PCFG_DMASEL3)
|
||||
#define TX4939_PCFG_DMASEL2 0x00000004
|
||||
#define TX4939_PCFG_DMASEL2_DRQ2 0x00000000
|
||||
#define TX4939_PCFG_DMASEL2_SIO0 0x00000004
|
||||
#define TX4939_PCFG_DMASEL1 0x00000002
|
||||
#define TX4939_PCFG_DMASEL1_DRQ1 0x00000000
|
||||
#define TX4939_PCFG_DMASEL0 0x00000001
|
||||
#define TX4939_PCFG_DMASEL0_DRQ0 0x00000000
|
||||
|
||||
/* CLKCTR : Clock Control */
|
||||
#define TX4939_CLKCTR_IOSCKD 0x8000000000000000ULL
|
||||
#define TX4939_CLKCTR_SYSCKD 0x4000000000000000ULL
|
||||
#define TX4939_CLKCTR_TM5CKD 0x2000000000000000ULL
|
||||
#define TX4939_CLKCTR_TM4CKD 0x1000000000000000ULL
|
||||
#define TX4939_CLKCTR_TM3CKD 0x0800000000000000ULL
|
||||
#define TX4939_CLKCTR_CIRCKD 0x0400000000000000ULL
|
||||
#define TX4939_CLKCTR_SIO3CKD 0x0200000000000000ULL
|
||||
#define TX4939_CLKCTR_SIO2CKD 0x0100000000000000ULL
|
||||
#define TX4939_CLKCTR_SIO1CKD 0x0080000000000000ULL
|
||||
#define TX4939_CLKCTR_VPCCKD 0x0040000000000000ULL
|
||||
#define TX4939_CLKCTR_EPCICKD 0x0020000000000000ULL
|
||||
#define TX4939_CLKCTR_ETH1CKD 0x0008000000000000ULL
|
||||
#define TX4939_CLKCTR_ATA1CKD 0x0004000000000000ULL
|
||||
#define TX4939_CLKCTR_BROMCKD 0x0002000000000000ULL
|
||||
#define TX4939_CLKCTR_NDCCKD 0x0001000000000000ULL
|
||||
#define TX4939_CLKCTR_I2CCKD 0x0000800000000000ULL
|
||||
#define TX4939_CLKCTR_ETH0CKD 0x0000400000000000ULL
|
||||
#define TX4939_CLKCTR_SPICKD 0x0000200000000000ULL
|
||||
#define TX4939_CLKCTR_SRAMCKD 0x0000100000000000ULL
|
||||
#define TX4939_CLKCTR_PCI1CKD 0x0000080000000000ULL
|
||||
#define TX4939_CLKCTR_DMA1CKD 0x0000040000000000ULL
|
||||
#define TX4939_CLKCTR_ACLCKD 0x0000020000000000ULL
|
||||
#define TX4939_CLKCTR_ATA0CKD 0x0000010000000000ULL
|
||||
#define TX4939_CLKCTR_DMA0CKD 0x0000008000000000ULL
|
||||
#define TX4939_CLKCTR_PCICCKD 0x0000004000000000ULL
|
||||
#define TX4939_CLKCTR_I2SCKD 0x0000002000000000ULL
|
||||
#define TX4939_CLKCTR_TM0CKD 0x0000001000000000ULL
|
||||
#define TX4939_CLKCTR_TM1CKD 0x0000000800000000ULL
|
||||
#define TX4939_CLKCTR_TM2CKD 0x0000000400000000ULL
|
||||
#define TX4939_CLKCTR_SIO0CKD 0x0000000200000000ULL
|
||||
#define TX4939_CLKCTR_CYPCKD 0x0000000100000000ULL
|
||||
#define TX4939_CLKCTR_IOSRST 0x80000000
|
||||
#define TX4939_CLKCTR_SYSRST 0x40000000
|
||||
#define TX4939_CLKCTR_TM5RST 0x20000000
|
||||
#define TX4939_CLKCTR_TM4RST 0x10000000
|
||||
#define TX4939_CLKCTR_TM3RST 0x08000000
|
||||
#define TX4939_CLKCTR_CIRRST 0x04000000
|
||||
#define TX4939_CLKCTR_SIO3RST 0x02000000
|
||||
#define TX4939_CLKCTR_SIO2RST 0x01000000
|
||||
#define TX4939_CLKCTR_SIO1RST 0x00800000
|
||||
#define TX4939_CLKCTR_VPCRST 0x00400000
|
||||
#define TX4939_CLKCTR_EPCIRST 0x00200000
|
||||
#define TX4939_CLKCTR_ETH1RST 0x00080000
|
||||
#define TX4939_CLKCTR_ATA1RST 0x00040000
|
||||
#define TX4939_CLKCTR_BROMRST 0x00020000
|
||||
#define TX4939_CLKCTR_NDCRST 0x00010000
|
||||
#define TX4939_CLKCTR_I2CRST 0x00008000
|
||||
#define TX4939_CLKCTR_ETH0RST 0x00004000
|
||||
#define TX4939_CLKCTR_SPIRST 0x00002000
|
||||
#define TX4939_CLKCTR_SRAMRST 0x00001000
|
||||
#define TX4939_CLKCTR_PCI1RST 0x00000800
|
||||
#define TX4939_CLKCTR_DMA1RST 0x00000400
|
||||
#define TX4939_CLKCTR_ACLRST 0x00000200
|
||||
#define TX4939_CLKCTR_ATA0RST 0x00000100
|
||||
#define TX4939_CLKCTR_DMA0RST 0x00000080
|
||||
#define TX4939_CLKCTR_PCICRST 0x00000040
|
||||
#define TX4939_CLKCTR_I2SRST 0x00000020
|
||||
#define TX4939_CLKCTR_TM0RST 0x00000010
|
||||
#define TX4939_CLKCTR_TM1RST 0x00000008
|
||||
#define TX4939_CLKCTR_TM2RST 0x00000004
|
||||
#define TX4939_CLKCTR_SIO0RST 0x00000002
|
||||
#define TX4939_CLKCTR_CYPRST 0x00000001
|
||||
|
||||
/*
|
||||
* CRYPTO
|
||||
*/
|
||||
#define TX4939_CRYPTO_CSR_SAESO 0x08000000
|
||||
#define TX4939_CRYPTO_CSR_SAESI 0x04000000
|
||||
#define TX4939_CRYPTO_CSR_SDESO 0x02000000
|
||||
#define TX4939_CRYPTO_CSR_SDESI 0x01000000
|
||||
#define TX4939_CRYPTO_CSR_INDXBST_MASK 0x00700000
|
||||
#define TX4939_CRYPTO_CSR_INDXBST(n) ((n) << 20)
|
||||
#define TX4939_CRYPTO_CSR_TOINT 0x00080000
|
||||
#define TX4939_CRYPTO_CSR_DCINT 0x00040000
|
||||
#define TX4939_CRYPTO_CSR_GBINT 0x00010000
|
||||
#define TX4939_CRYPTO_CSR_INDXAST_MASK 0x0000e000
|
||||
#define TX4939_CRYPTO_CSR_INDXAST(n) ((n) << 13)
|
||||
#define TX4939_CRYPTO_CSR_CSWAP_MASK 0x00001800
|
||||
#define TX4939_CRYPTO_CSR_CSWAP_NONE 0x00000000
|
||||
#define TX4939_CRYPTO_CSR_CSWAP_IN 0x00000800
|
||||
#define TX4939_CRYPTO_CSR_CSWAP_OUT 0x00001000
|
||||
#define TX4939_CRYPTO_CSR_CSWAP_BOTH 0x00001800
|
||||
#define TX4939_CRYPTO_CSR_CDIV_MASK 0x00000600
|
||||
#define TX4939_CRYPTO_CSR_CDIV_DIV2 0x00000000
|
||||
#define TX4939_CRYPTO_CSR_CDIV_DIV1 0x00000200
|
||||
#define TX4939_CRYPTO_CSR_CDIV_DIV2ALT 0x00000400
|
||||
#define TX4939_CRYPTO_CSR_CDIV_DIV1ALT 0x00000600
|
||||
#define TX4939_CRYPTO_CSR_PDINT_MASK 0x000000c0
|
||||
#define TX4939_CRYPTO_CSR_PDINT_ALL 0x00000000
|
||||
#define TX4939_CRYPTO_CSR_PDINT_END 0x00000040
|
||||
#define TX4939_CRYPTO_CSR_PDINT_NEXT 0x00000080
|
||||
#define TX4939_CRYPTO_CSR_PDINT_NONE 0x000000c0
|
||||
#define TX4939_CRYPTO_CSR_GINTE 0x00000008
|
||||
#define TX4939_CRYPTO_CSR_RSTD 0x00000004
|
||||
#define TX4939_CRYPTO_CSR_RSTC 0x00000002
|
||||
#define TX4939_CRYPTO_CSR_ENCR 0x00000001
|
||||
|
||||
/* bits for tx4939_crypto_reg.cdr.gen.ctrl */
|
||||
#define TX4939_CRYPTO_CTX_ENGINE_MASK 0x00000003
|
||||
#define TX4939_CRYPTO_CTX_ENGINE_DES 0x00000000
|
||||
#define TX4939_CRYPTO_CTX_ENGINE_AES 0x00000001
|
||||
#define TX4939_CRYPTO_CTX_ENGINE_MD5 0x00000002
|
||||
#define TX4939_CRYPTO_CTX_ENGINE_SHA1 0x00000003
|
||||
#define TX4939_CRYPTO_CTX_TDMS 0x00000010
|
||||
#define TX4939_CRYPTO_CTX_CMS 0x00000020
|
||||
#define TX4939_CRYPTO_CTX_DMS 0x00000040
|
||||
#define TX4939_CRYPTO_CTX_UPDATE 0x00000080
|
||||
|
||||
/* bits for tx4939_crypto_desc.ctrl */
|
||||
#define TX4939_CRYPTO_DESC_OB_CNT_MASK 0xffe00000
|
||||
#define TX4939_CRYPTO_DESC_OB_CNT(cnt) ((cnt) << 21)
|
||||
#define TX4939_CRYPTO_DESC_IB_CNT_MASK 0x001ffc00
|
||||
#define TX4939_CRYPTO_DESC_IB_CNT(cnt) ((cnt) << 10)
|
||||
#define TX4939_CRYPTO_DESC_START 0x00000200
|
||||
#define TX4939_CRYPTO_DESC_END 0x00000100
|
||||
#define TX4939_CRYPTO_DESC_XOR 0x00000010
|
||||
#define TX4939_CRYPTO_DESC_LAST 0x00000008
|
||||
#define TX4939_CRYPTO_DESC_ERR_MASK 0x00000006
|
||||
#define TX4939_CRYPTO_DESC_ERR_NONE 0x00000000
|
||||
#define TX4939_CRYPTO_DESC_ERR_TOUT 0x00000002
|
||||
#define TX4939_CRYPTO_DESC_ERR_DIGEST 0x00000004
|
||||
#define TX4939_CRYPTO_DESC_OWN 0x00000001
|
||||
|
||||
/* bits for tx4939_crypto_desc.index */
|
||||
#define TX4939_CRYPTO_DESC_HASH_IDX_MASK 0x00000070
|
||||
#define TX4939_CRYPTO_DESC_HASH_IDX(idx) ((idx) << 4)
|
||||
#define TX4939_CRYPTO_DESC_ENCRYPT_IDX_MASK 0x00000007
|
||||
#define TX4939_CRYPTO_DESC_ENCRYPT_IDX(idx) ((idx) << 0)
|
||||
|
||||
#define TX4939_CRYPTO_NR_SET 6
|
||||
|
||||
#define TX4939_CRYPTO_RCSR_INTE 0x00000008
|
||||
#define TX4939_CRYPTO_RCSR_RST 0x00000004
|
||||
#define TX4939_CRYPTO_RCSR_FIN 0x00000002
|
||||
#define TX4939_CRYPTO_RCSR_ST 0x00000001
|
||||
|
||||
/*
|
||||
* VPC
|
||||
*/
|
||||
#define TX4939_VPC_CSR_GBINT 0x00010000
|
||||
#define TX4939_VPC_CSR_SWAPO 0x00000020
|
||||
#define TX4939_VPC_CSR_SWAPI 0x00000010
|
||||
#define TX4939_VPC_CSR_GINTE 0x00000008
|
||||
#define TX4939_VPC_CSR_RSTD 0x00000004
|
||||
#define TX4939_VPC_CSR_RSTVPC 0x00000002
|
||||
|
||||
#define TX4939_VPC_CTRLA_VDPSN 0x00000200
|
||||
#define TX4939_VPC_CTRLA_PBUSY 0x00000100
|
||||
#define TX4939_VPC_CTRLA_DCINT 0x00000080
|
||||
#define TX4939_VPC_CTRLA_UOINT 0x00000040
|
||||
#define TX4939_VPC_CTRLA_PDINT_MASK 0x00000030
|
||||
#define TX4939_VPC_CTRLA_PDINT_ALL 0x00000000
|
||||
#define TX4939_VPC_CTRLA_PDINT_NEXT 0x00000010
|
||||
#define TX4939_VPC_CTRLA_PDINT_NONE 0x00000030
|
||||
#define TX4939_VPC_CTRLA_VDVLDP 0x00000008
|
||||
#define TX4939_VPC_CTRLA_VDMODE 0x00000004
|
||||
#define TX4939_VPC_CTRLA_VDFOR 0x00000002
|
||||
#define TX4939_VPC_CTRLA_ENVPC 0x00000001
|
||||
|
||||
/* bits for tx4939_vpc_desc.ctrl1 */
|
||||
#define TX4939_VPC_DESC_CTRL1_ERR_MASK 0x00000006
|
||||
#define TX4939_VPC_DESC_CTRL1_OWN 0x00000001
|
||||
|
||||
#define tx4939_ddrcptr ((struct tx4939_ddrc_reg __iomem *)TX4939_DDRC_REG)
|
||||
#define tx4939_ebuscptr tx4938_ebuscptr
|
||||
#define tx4939_ircptr \
|
||||
((struct tx4939_irc_reg __iomem *)TX4939_IRC_REG)
|
||||
#define tx4939_pcicptr tx4938_pcicptr
|
||||
#define tx4939_pcic1ptr tx4938_pcic1ptr
|
||||
#define tx4939_ccfgptr \
|
||||
((struct tx4939_ccfg_reg __iomem *)TX4939_CCFG_REG)
|
||||
#define tx4939_sramcptr tx4938_sramcptr
|
||||
#define tx4939_cryptoptr \
|
||||
((struct tx4939_crypto_reg __iomem *)TX4939_CRYPTO_REG)
|
||||
#define tx4939_vpcptr ((struct tx4939_vpc_reg __iomem *)TX4939_VPC_REG)
|
||||
|
||||
#define TX4939_REV_MAJ_MIN() \
|
||||
((__u32)__raw_readq(&tx4939_ccfgptr->crir) & 0x00ff)
|
||||
#define TX4939_REV_PCODE() \
|
||||
((__u32)__raw_readq(&tx4939_ccfgptr->crir) >> 16)
|
||||
#define TX4939_CCFG_BCFG() \
|
||||
((__u32)((__raw_readq(&tx4939_ccfgptr->ccfg) & TX4939_CCFG_BCFG_MASK) \
|
||||
>> 32))
|
||||
|
||||
#define tx4939_ccfg_clear(bits) tx4938_ccfg_clear(bits)
|
||||
#define tx4939_ccfg_set(bits) tx4938_ccfg_set(bits)
|
||||
#define tx4939_ccfg_change(change, new) tx4938_ccfg_change(change, new)
|
||||
|
||||
#define TX4939_EBUSC_CR(ch) TX4927_EBUSC_CR(ch)
|
||||
#define TX4939_EBUSC_BA(ch) TX4927_EBUSC_BA(ch)
|
||||
#define TX4939_EBUSC_SIZE(ch) TX4927_EBUSC_SIZE(ch)
|
||||
#define TX4939_EBUSC_WIDTH(ch) \
|
||||
(16 >> ((__u32)(TX4939_EBUSC_CR(ch) >> 20) & 0x1))
|
||||
|
||||
/* SCLK0 = MSTCLK * 429/19 * 16/245 / 2 (14.745MHz for MST 20MHz) */
|
||||
#define TX4939_SCLK0(mst) \
|
||||
((((mst) + 245/2) / 245UL * 429 * 16 + 19) / 19 / 2)
|
||||
|
||||
void tx4939_wdt_init(void);
|
||||
void tx4939_setup(void);
|
||||
void tx4939_time_init(unsigned int tmrnr);
|
||||
void tx4939_sio_init(unsigned int sclk, unsigned int cts_mask);
|
||||
void tx4939_spi_init(int busid);
|
||||
void tx4939_ethaddr_init(unsigned char *addr0, unsigned char *addr1);
|
||||
int tx4939_report_pciclk(void);
|
||||
void tx4939_report_pci1clk(void);
|
||||
struct pci_dev;
|
||||
int tx4939_pcic1_map_irq(const struct pci_dev *dev, u8 slot);
|
||||
int tx4939_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
|
||||
void tx4939_setup_pcierr_irq(void);
|
||||
void tx4939_irq_init(void);
|
||||
int tx4939_irq(void);
|
||||
void tx4939_mtd_init(int ch);
|
||||
void tx4939_ata_init(void);
|
||||
void tx4939_rtc_init(void);
|
||||
void tx4939_ndfmc_init(unsigned int hold, unsigned int spw,
|
||||
unsigned char ch_mask, unsigned char wide_mask);
|
||||
void tx4939_dmac_init(int memcpy_chan0, int memcpy_chan1);
|
||||
void tx4939_aclc_init(void);
|
||||
void tx4939_sramc_init(void);
|
||||
void tx4939_rng_init(void);
|
||||
|
||||
#endif /* __ASM_TXX9_TX4939_H */
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
* Author: Paul Burton <paul.burton@mips.com>
|
||||
*/
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/of.h>
|
||||
|
|
@ -97,7 +98,7 @@ void mips_cpc_lock_other(unsigned int core)
|
|||
curr_core = cpu_core(¤t_cpu_data);
|
||||
spin_lock_irqsave(&per_cpu(cpc_core_lock, curr_core),
|
||||
per_cpu(cpc_core_lock_flags, curr_core));
|
||||
write_cpc_cl_other(core << __ffs(CPC_Cx_OTHER_CORENUM));
|
||||
write_cpc_cl_other(FIELD_PREP(CPC_Cx_OTHER_CORENUM, core));
|
||||
|
||||
/*
|
||||
* Ensure the core-other region reflects the appropriate core &
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user