Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVIDIA: SAUCE: acpi/prmt: find block with specific type #24

Open
wants to merge 184 commits into
base: 22.04_linux-nvidia-6.8
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
2dca5c2
UBUNTU: [Packaging] Initialize linux-nvidia-6.5
ianmay81 Oct 3, 2023
4ffed2b
Revert "UBUNTU: SAUCE: modpost: support arbitrary symbol length in mo…
ianmay81 Oct 4, 2023
4d22b5c
UBUNTU: [Packaging] update variants
ianmay81 Oct 4, 2023
2750441
UBUNTU: [Packaging] update Ubuntu.md
ianmay81 Oct 4, 2023
fa5bac7
UBUNTU: Start new release
ianmay81 Oct 4, 2023
a1a8145
UBUNTU: [Config] nvidia-6.5: update annotations
ianmay81 Oct 4, 2023
4fbaa3a
UBUNTU: Ubuntu-nvidia-6.5-6.5.0-1001.1
ianmay81 Oct 4, 2023
2b8fdbb
UBUNTU: [Packaging] nvidia-6.5: disable rust support
ianmay81 Oct 12, 2023
bdba7f6
UBUNTU: Start new release
ianmay81 Oct 12, 2023
bfa7339
UBUNTU: link-to-tracker: update tracking bug
ianmay81 Oct 12, 2023
f433080
UBUNTU: [Config] nvidia-6.5: update annotations
ianmay81 Oct 12, 2023
bd7d825
UBUNTU: Ubuntu-nvidia-6.5-6.5.0-1004.4
ianmay81 Oct 12, 2023
5bea85b
UBUNTU: Start new release
piso77 Dec 11, 2023
0d0e899
UBUNTU: rename debian.nvidia-6.6 to debian.nvidia
piso77 Dec 11, 2023
91a11e5
UBUNTU: link-to-tracker: update tracking bug
piso77 Dec 11, 2023
5783da4
UBUNTU: [Packaging] update variants
piso77 Dec 11, 2023
c02d3f9
UBUNTU: [Packaging] update update.conf
piso77 Dec 11, 2023
061d862
UBUNTU: [Packaging] move to gcc-13 by default
Jul 17, 2023
cf801ca
UBUNTU: rebase on Ubuntu-6.6.0-14.14
piso77 Dec 11, 2023
107a9e7
UBUNTU: [Config] updateconfigs following Ubuntu-6.6.0-14.14 rebase
piso77 Dec 11, 2023
3eda4aa
UBUNTU: Ubuntu-nvidia-6.6.0-1001.1
piso77 Dec 11, 2023
015dfa1
UBUNTU: [Packaging] move to linux 6.8
Feb 27, 2024
d765307
UBUNTU: update dropped.txt
Feb 27, 2024
aa4135e
UBUNTU: Start new release
Feb 27, 2024
569253a
UBUNTU: link-to-tracker: update tracking bug
Feb 27, 2024
871fb35
UBUNTU: debian.nvidia/dkms-versions -- update from kernel-versions (m…
Feb 27, 2024
d0874d5
UBUNTU: [Packaging] add Rust build dependencies
Feb 27, 2024
91cd120
UBUNTU: [Config] update annotations after rebase to v6.8
Feb 27, 2024
32689bf
UBUNTU: [Packaging] clean ABI check files
Feb 27, 2024
8305744
UBUNTU: Ubuntu-nvidia-6.8.0-1001.1
Feb 27, 2024
a838c56
UBUNTU: Start new release
ianmay81 Mar 18, 2024
714734b
UBUNTU: link-to-tracker: update tracking bug
ianmay81 Mar 18, 2024
60aa90e
UBUNTU: [Config] nvidia: update annotations
ianmay81 Mar 18, 2024
61a4493
UBUNTU: Ubuntu-nvidia-6.8.0-1002.2
ianmay81 Mar 18, 2024
3b12b3b
UBUNTU: [Packaging] dkms-versions standalone provides support
nvidia-bfigg Jan 5, 2024
4f9a298
UBUNTU: [Packaging] add versioning to dkms standalone rprovides
ianmay81 Mar 21, 2024
075c033
NVIDIA: [Config]: Grouping AAEON config options together, under a com…
nvidia-bfigg Apr 4, 2024
8bf1e54
NVIDIA: [Config]: Disable the NOUVEAU driver which is not used with -…
nvidia-bfigg Apr 4, 2024
a5101e5
NVIDIA: [Config]: Adding CORESIGHT and ARM64_ERRATUM configs to annot…
nvidia-bfigg Apr 5, 2024
79dab5c
UBUNTU: [Config] update nvidia specific annotations with notes
ianmay81 Apr 10, 2024
f0b0b4c
UBUNTU: [Config] update annotations with updateconfigs
ianmay81 Apr 10, 2024
aadfc17
UBUNTU: [Packaging] remove tools host package
ianmay81 Apr 10, 2024
c51be2f
NVIDIA: SAUCE: Patch NFS driver to support GDS with 6.8 Kernel
sourabgupta3 Oct 30, 2023
884b177
NVIDIA: SAUCE: NVMe/MVMEeOF: Patch NVMe/NVMeOF driver to support GDS …
sourabgupta3 Oct 30, 2023
5e62567
NVIDIA: [Config] Add nvidia-fs build dependencies
nvidia-bfigg Mar 29, 2024
c9dda7d
UBUNTU: [Packaging] drop getabis data
ianmay81 Apr 15, 2024
b327bb9
UBUNTU: [Packaging] Replace fs/cifs with fs/smb in inclusion list
ianmay81 Apr 15, 2024
c692821
UBUNTU: [Packaging] remove bindgen-0.56
ianmay81 Apr 15, 2024
c15e8e9
UBUNTU: Start new release
ianmay81 Apr 15, 2024
faf8a6a
UBUNTU: [Packaging] debian.nvidia/dkms-versions -- update from kernel…
ianmay81 Apr 10, 2024
9054505
UBUNTU: link-to-tracker: update tracking bug
ianmay81 Apr 22, 2024
ce28d92
UBUNTU: Ubuntu-nvidia-6.8.0-1006.6
ianmay81 Apr 22, 2024
d79b588
arm64/mm: make set_ptes() robust when OAs cross 48-bit boundary
Jan 29, 2024
6778849
arm/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
2678700
nios2/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
6dc6c98
powerpc/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
f949be9
riscv/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
c818096
s390/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
73bb549
sparc/pgtable: define PFN_PTE_SHIFT
davidhildenbrand Jan 29, 2024
27be131
mm/pgtable: make pte_next_pfn() independent of set_ptes()
davidhildenbrand Jan 29, 2024
3b2be51
arm/mm: use pte_next_pfn() in set_ptes()
davidhildenbrand Jan 29, 2024
eec86ef
powerpc/mm: use pte_next_pfn() in set_ptes()
davidhildenbrand Jan 29, 2024
85a3255
mm/memory: factor out copying the actual PTE in copy_present_pte()
davidhildenbrand Jan 29, 2024
635c770
mm/memory: pass PTE to copy_present_pte()
davidhildenbrand Jan 29, 2024
bd4473b
mm/memory: optimize fork() with PTE-mapped THP
davidhildenbrand Jan 29, 2024
1b988df
mm/memory: ignore dirty/accessed/soft-dirty bits in folio_pte_batch()
davidhildenbrand Jan 29, 2024
0887301
mm/memory: ignore writable bit in folio_pte_batch()
davidhildenbrand Jan 29, 2024
fbeebb6
mm: clarify the spec for set_ptes()
Feb 15, 2024
fbab765
mm: thp: batch-collapse PMD with set_ptes()
Feb 15, 2024
9e7ec9e
mm: introduce pte_advance_pfn() and use for pte_next_pfn()
Feb 15, 2024
0268df0
arm64/mm: convert pte_next_pfn() to pte_advance_pfn()
Feb 15, 2024
7f40a7b
x86/mm: convert pte_next_pfn() to pte_advance_pfn()
Feb 15, 2024
969e2aa
mm: tidy up pte_next_pfn() definition
Feb 15, 2024
514bce3
arm64/mm: convert READ_ONCE(*ptep) to ptep_get(ptep)
Feb 15, 2024
59e7824
arm64/mm: convert set_pte_at() to set_ptes(..., 1)
Feb 15, 2024
b741058
arm64/mm: convert ptep_clear() to ptep_get_and_clear()
Feb 15, 2024
8575f00
arm64/mm: new ptep layer to manage contig bit
Feb 15, 2024
8acf57c
arm64/mm: dplit __flush_tlb_range() to elide trailing DSB
Feb 15, 2024
7f032ec
NVIDIA: [Config] arm64: ARM64_CONTPTE=y
Mar 27, 2024
dd76084
arm64/mm: wire up PTE_CONT for user mappings
Feb 15, 2024
aaaa30f
arm64/mm: implement new wrprotect_ptes() batch API
Feb 15, 2024
5fcd50b
arm64/mm: implement new [get_and_]clear_full_ptes() batch APIs
Feb 15, 2024
8bcf933
mm: add pte_batch_hint() to reduce scanning in folio_pte_batch()
Feb 15, 2024
f5ff2ce
arm64/mm: implement pte_batch_hint()
Feb 15, 2024
fc07d05
arm64/mm: __always_inline to improve fork() perf
Feb 15, 2024
a9fa5a7
arm64/mm: automatically fold contpte mappings
Feb 15, 2024
413256b
arm64/mm: export contpte symbols only to GPL users
Feb 26, 2024
53ac287
arm64/mm: improve comment in contpte_ptep_get_lockless()
Feb 26, 2024
f4b5934
NVIDIA: [Packaging] update nvidia-fs driver to latest version
nvidia-bfigg May 23, 2024
0e5bcaa
UBUNTU: [Packaging] blacklist coresight_etm4x
ianmay81 Apr 25, 2024
914afae
UBUNTU: [Packaging] update Ubuntu.md
jacobmartin0 May 30, 2024
adf84ce
UBUNTU: Start new release
jacobmartin0 May 30, 2024
588b8db
UBUNTU: [Packaging] enable perf python module
Mar 14, 2024
b62a9b6
UBUNTU: [Packaging] add Real-time Linux Analysis tool (rtla) to linux…
Mar 26, 2024
fce175b
UBUNTU: [Packaging] update dependencies for rtla
Apr 9, 2024
4ea9ffe
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 May 30, 2024
a803852
UBUNTU: [Packaging] debian.nvidia/dkms-versions -- update from kernel…
jacobmartin0 May 30, 2024
f47d119
UBUNTU: Ubuntu-nvidia-6.8.0-1007.7
jacobmartin0 May 30, 2024
6ab6190
UBUNTU: Start new release
jacobmartin0 Jun 13, 2024
63a921f
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jun 13, 2024
dfdd953
UBUNTU: Ubuntu-nvidia-6.8.0-1008.8
jacobmartin0 Jun 13, 2024
0195944
NVIDIA: SAUCE: NFS: Export nvfs register and unregister functions as GPL
sourabgupta3 Jun 6, 2024
45b2065
NVIDIA: SAUCE: NVMe/NVMeoF: Export nvfs register and unregister funct…
sourabgupta3 Jun 6, 2024
0ba0b29
mlxbf_gige: add support to display pause frame counters
dthompso Mar 5, 2024
23929f1
UBUNTU: Start new release
jacobmartin0 Jun 21, 2024
967dd79
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jun 21, 2024
6b37cb9
UBUNTU: Ubuntu-nvidia-6.8.0-1009.9
jacobmartin0 Jun 21, 2024
a813631
UBUNTU: Start new release
jacobmartin0 Jul 15, 2024
af9e1a4
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jul 15, 2024
2457e6a
UBUNTU: Ubuntu-nvidia-6.8.0-1010.10
jacobmartin0 Jul 15, 2024
3cd8ee6
platform/mellanox: mlxbf-pmc: Replace uintN_t with kernel-style types
shravankumarr Feb 13, 2024
1be8b6b
platform/mellanox: mlxbf-pmc: Cleanup signed/unsigned mix-up
shravankumarr Feb 13, 2024
cfcb0bb
platform/mellanox: mlxbf-pmc: mlxbf_pmc_event_list(): make size ptr o…
luiz-cap Feb 22, 2024
5b9cae4
platform/mellanox: mlxbf-pmc: Ignore unsupported performance blocks
luiz-cap Feb 22, 2024
6e42447
platform/mellanox: mlxbf-pmc: fix signedness bugs
Feb 29, 2024
2299bb3
PCI: Clear Secondary Status errors after enumeration
Jan 16, 2024
dac1e21
x86: Stop using weak symbols for __iowrite32_copy()
jgunthorpe Apr 11, 2024
20517f3
s390: Implement __iowrite32_copy()
jgunthorpe Apr 11, 2024
006f5b6
s390: Stop using weak symbols for __iowrite64_copy()
jgunthorpe Apr 11, 2024
2b0473f
arm64/io: Provide a WC friendly __iowriteXX_copy()
jgunthorpe Apr 11, 2024
158f385
net: hns3: Remove io_stop_wc() calls after __iowrite64_copy()
jgunthorpe Apr 11, 2024
0c49d7f
UBUNTU: Start new release
jacobmartin0 Jul 17, 2024
079e32b
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jul 17, 2024
704dbb3
UBUNTU: Ubuntu-nvidia-6.8.0-1011.11
jacobmartin0 Jul 17, 2024
5f128d9
UBUNTU: Start new release
jacobmartin0 Aug 9, 2024
20725e0
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Aug 9, 2024
3833d3e
UBUNTU: Ubuntu-nvidia-6.8.0-1012.12
jacobmartin0 Aug 9, 2024
ec48890
PCI: Extend ACS configurability
Jun 25, 2024
a0ae55d
mm: fix old/young bit handling in the faulting path
Jul 10, 2024
48f7072
NVIDIA: [Config] EFI: set CAPSULE_LOADER=y for arm64
nvidia-bfigg Aug 7, 2024
200f05a
NVIDIA: SAUCE: iommu/arm-smmu-v3: Allow default substream bypass with…
nicolinc Aug 5, 2024
87b7751
UBUNTU: Start new release
jacobmartin0 Aug 20, 2024
392feda
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Aug 20, 2024
bd67422
UBUNTU: Ubuntu-nvidia-6.8.0-1013.14
jacobmartin0 Aug 20, 2024
e98c02f
UBUNTU: Start new release
jacobmartin0 Sep 3, 2024
c71d885
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Sep 3, 2024
7d88485
UBUNTU: Ubuntu-nvidia-6.8.0-1014.15
jacobmartin0 Sep 3, 2024
0bdfb9a
UBUNTU: [Packaging] Initialize linux-nvidia-6.8
ianmay81 Mar 28, 2024
8c7a7a3
UBUNTU: [Packaging] nvidia-6.8: remove rust dependencies
ianmay81 Apr 1, 2024
c81ce20
UBUNTU: [Config] nvidia-6.8: update annotations
ianmay81 Apr 2, 2024
0ab8838
UBUNTU: Start new release
ianmay81 Apr 2, 2024
853bd5f
UBUNTU: Ubuntu-nvidia-6.8-6.8.0-1002.2~22.04.2
ianmay81 Apr 2, 2024
5a55ff4
UBUNTU: [Packaging] drop getabis data
ianmay81 Apr 30, 2024
05b164f
UBUNTU: [Packaging] update variants
ianmay81 Apr 30, 2024
94994f1
UBUNTU: [Packaging] update Ubuntu.md
ianmay81 Apr 30, 2024
21c6c28
UBUNTU: Start new release
ianmay81 Apr 30, 2024
b312279
NVIDIA: [Config] Add nvidia-fs build dependencies
ianmay81 May 1, 2024
efd4be9
UBUNTU: link-to-tracker: update tracking bug
ianmay81 May 1, 2024
c77a1c7
UBUNTU: [Packaging] debian.nvidia/dkms-versions -- update from kernel…
ianmay81 May 1, 2024
013f6f8
UBUNTU: Ubuntu-nvidia-6.8-6.8.0-1006.6~22.04.2
ianmay81 May 1, 2024
3f544bc
UBUNTU: [Packaging] blacklist coresight_etm4x
ianmay81 Apr 25, 2024
18ed7df
UBUNTU: [Packaging] update variants
jacobmartin0 Jun 13, 2024
6a3cee9
UBUNTU: [Packaging] update update.conf
jacobmartin0 Jun 13, 2024
17ff55b
UBUNTU: Start new release
jacobmartin0 Jun 13, 2024
f26e4b3
NVIDIA: [Config] arm64: ARM64_CONTPTE=y
Mar 27, 2024
870ece1
UBUNTU: [Packaging] enable perf python module
Mar 14, 2024
53b3aae
UBUNTU: [Packaging] add Real-time Linux Analysis tool (rtla) to linux…
Mar 26, 2024
cfd8f0f
UBUNTU: [Packaging] update dependencies for rtla
Apr 9, 2024
2102bd5
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jun 13, 2024
c07a44d
UBUNTU: [Packaging] debian.nvidia-6.8/dkms-versions -- update from ke…
jacobmartin0 Jun 13, 2024
730d182
UBUNTU: [Packaging] nvidia-6.8: disable rtla in hwe kernels
Jun 4, 2024
989e111
UBUNTU: Ubuntu-nvidia-6.8-6.8.0-1008.8~22.04.1
jacobmartin0 Jun 14, 2024
d53a58e
UBUNTU: [Packaging] update variants
jacobmartin0 Jun 24, 2024
798598c
UBUNTU: Start new release
jacobmartin0 Jun 24, 2024
9c3be0c
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jun 24, 2024
3e498ec
UBUNTU: Ubuntu-nvidia-6.8-6.8.0-1009.9~22.04.1
jacobmartin0 Jun 24, 2024
e68e676
UBUNTU: Start new release
jacobmartin0 Jul 15, 2024
e478960
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jul 15, 2024
ba87589
UBUNTU: Ubuntu-nvidia-6.8-6.8.0-1010.10~22.04.1
jacobmartin0 Jul 15, 2024
fe64e95
UBUNTU: Start new release
jacobmartin0 Jul 17, 2024
2b71e99
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Jul 17, 2024
c1233eb
UBUNTU: Ubuntu-nvidia-6.8-6.8.0-1011.11~22.04.1
jacobmartin0 Jul 17, 2024
c31544c
UBUNTU: Start new release
jacobmartin0 Aug 9, 2024
15cc868
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Aug 9, 2024
0f9cbe8
UBUNTU: Ubuntu-nvidia-6.8-6.8.0-1012.12~22.04.1
jacobmartin0 Aug 9, 2024
25b1836
UBUNTU: [Config] nvidia-6.8: Derive annotations from parent noble/lin…
jacobmartin0 Aug 20, 2024
a64ad52
UBUNTU: [Packaging] nvidia-6.8: Don't produce the linux-nvidia-6.8-to…
jacobmartin0 Aug 20, 2024
9ca0306
UBUNTU: Start new release
jacobmartin0 Aug 20, 2024
e1597fc
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Aug 20, 2024
5bc361b
UBUNTU: Ubuntu-nvidia-6.8-6.8.0-1013.14~22.04.1
jacobmartin0 Aug 20, 2024
e6bf7f9
UBUNTU: Start new release
jacobmartin0 Sep 9, 2024
b34e432
UBUNTU: link-to-tracker: update tracking bug
jacobmartin0 Sep 9, 2024
b4fa822
UBUNTU: Ubuntu-nvidia-6.8-6.8.0-1014.15~22.04.1
jacobmartin0 Sep 9, 2024
5797936
NVIDIA: SAUCE: acpi/prmt: find block with specific type
KobaKoNvidia Jul 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4572,6 +4572,38 @@
bridges without forcing it upstream. Note:
this removes isolation between devices and
may put more devices in an IOMMU group.
config_acs=
Format:
<ACS flags>@<pci_dev>[; ...]
Specify one or more PCI devices (in the format
specified above) optionally prepended with flags
and separated by semicolons. The respective
capabilities will be enabled, disabled or
unchanged based on what is specified in
flags.

ACS Flags is defined as follows:
bit-0 : ACS Source Validation
bit-1 : ACS Translation Blocking
bit-2 : ACS P2P Request Redirect
bit-3 : ACS P2P Completion Redirect
bit-4 : ACS Upstream Forwarding
bit-5 : ACS P2P Egress Control
bit-6 : ACS Direct Translated P2P
Each bit can be marked as:
'0' – force disabled
'1' – force enabled
'x' – unchanged
For example,
pci=config_acs=10x
would configure all devices that support
ACS to enable P2P Request Redirect, disable
Translation Blocking, and leave Source
Validation unchanged from whatever power-up
or firmware set it to.

Note: this may remove isolation between devices
and may put more devices in an IOMMU group.
force_floating [S390] Force usage of floating interrupts.
nomio [S390] Do not use MIO instructions.
norid [S390] ignore the RID field and force use of
Expand Down
10 changes: 5 additions & 5 deletions Ubuntu.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Name: linux
Version: 6.1.0
Series: 23.04 (lunar)
Name: linux-nvidia-6.8
Version: 6.8.0
Series: 22.04 (jammy)
Description:
This is the source code for the Ubuntu linux kernel for the 23.04 series. This
source tree is used to produce the flavours: generic, generic-64k, generic-lpae.
This is the source code for the Ubuntu linux kernel for the 22.04 series. This
source tree is used to produce the flavours: nvidia, nvidia-64k.
This kernel is configured to support the widest range of desktop, laptop and
server configurations.
2 changes: 2 additions & 0 deletions arch/arm/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ static inline void __sync_icache_dcache(pte_t pteval)
extern void __sync_icache_dcache(pte_t pteval);
#endif

#define PFN_PTE_SHIFT PAGE_SHIFT

void set_ptes(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pteval, unsigned int nr);
#define set_ptes set_ptes
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,6 @@ void set_ptes(struct mm_struct *mm, unsigned long addr,
if (--nr == 0)
break;
ptep++;
pte_val(pteval) += PAGE_SIZE;
pteval = pte_next_pfn(pteval);
}
}
9 changes: 9 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2229,6 +2229,15 @@ config UNWIND_PATCH_PAC_INTO_SCS
select UNWIND_TABLES
select DYNAMIC_SCS

config ARM64_CONTPTE
bool "Contiguous PTE mappings for user memory" if EXPERT
depends on TRANSPARENT_HUGEPAGE
default y
help
When enabled, user mappings are configured using the PTE contiguous
bit, for any mappings that meet the size and alignment requirements.
This reduces TLB pressure and improves performance.

endmenu # "Kernel Features"

menu "Boot options"
Expand Down
132 changes: 132 additions & 0 deletions arch/arm64/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,138 @@ extern void __memset_io(volatile void __iomem *, int, size_t);
#define memcpy_fromio(a,c,l) __memcpy_fromio((a),(c),(l))
#define memcpy_toio(c,a,l) __memcpy_toio((c),(a),(l))

/*
* The ARM64 iowrite implementation is intended to support drivers that want to
* use write combining. For instance PCI drivers using write combining with a 64
* byte __iowrite64_copy() expect to get a 64 byte MemWr TLP on the PCIe bus.
*
* Newer ARM core have sensitive write combining buffers, it is important that
* the stores be contiguous blocks of store instructions. Normal memcpy
* approaches have a very low chance to generate write combining.
*
* Since this is the only API on ARM64 that should be used with write combining
* it also integrates the DGH hint which is supposed to lower the latency to
* emit the large TLP from the CPU.
*/

static inline void __const_memcpy_toio_aligned32(volatile u32 __iomem *to,
const u32 *from, size_t count)
{
switch (count) {
case 8:
asm volatile("str %w0, [%8, #4 * 0]\n"
"str %w1, [%8, #4 * 1]\n"
"str %w2, [%8, #4 * 2]\n"
"str %w3, [%8, #4 * 3]\n"
"str %w4, [%8, #4 * 4]\n"
"str %w5, [%8, #4 * 5]\n"
"str %w6, [%8, #4 * 6]\n"
"str %w7, [%8, #4 * 7]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "rZ"(from[2]),
"rZ"(from[3]), "rZ"(from[4]), "rZ"(from[5]),
"rZ"(from[6]), "rZ"(from[7]), "r"(to));
break;
case 4:
asm volatile("str %w0, [%4, #4 * 0]\n"
"str %w1, [%4, #4 * 1]\n"
"str %w2, [%4, #4 * 2]\n"
"str %w3, [%4, #4 * 3]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "rZ"(from[2]),
"rZ"(from[3]), "r"(to));
break;
case 2:
asm volatile("str %w0, [%2, #4 * 0]\n"
"str %w1, [%2, #4 * 1]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "r"(to));
break;
case 1:
__raw_writel(*from, to);
break;
default:
BUILD_BUG();
}
}

void __iowrite32_copy_full(void __iomem *to, const void *from, size_t count);

static inline void __const_iowrite32_copy(void __iomem *to, const void *from,
size_t count)
{
if (count == 8 || count == 4 || count == 2 || count == 1) {
__const_memcpy_toio_aligned32(to, from, count);
dgh();
} else {
__iowrite32_copy_full(to, from, count);
}
}

#define __iowrite32_copy(to, from, count) \
(__builtin_constant_p(count) ? \
__const_iowrite32_copy(to, from, count) : \
__iowrite32_copy_full(to, from, count))

static inline void __const_memcpy_toio_aligned64(volatile u64 __iomem *to,
const u64 *from, size_t count)
{
switch (count) {
case 8:
asm volatile("str %x0, [%8, #8 * 0]\n"
"str %x1, [%8, #8 * 1]\n"
"str %x2, [%8, #8 * 2]\n"
"str %x3, [%8, #8 * 3]\n"
"str %x4, [%8, #8 * 4]\n"
"str %x5, [%8, #8 * 5]\n"
"str %x6, [%8, #8 * 6]\n"
"str %x7, [%8, #8 * 7]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "rZ"(from[2]),
"rZ"(from[3]), "rZ"(from[4]), "rZ"(from[5]),
"rZ"(from[6]), "rZ"(from[7]), "r"(to));
break;
case 4:
asm volatile("str %x0, [%4, #8 * 0]\n"
"str %x1, [%4, #8 * 1]\n"
"str %x2, [%4, #8 * 2]\n"
"str %x3, [%4, #8 * 3]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "rZ"(from[2]),
"rZ"(from[3]), "r"(to));
break;
case 2:
asm volatile("str %x0, [%2, #8 * 0]\n"
"str %x1, [%2, #8 * 1]\n"
:
: "rZ"(from[0]), "rZ"(from[1]), "r"(to));
break;
case 1:
__raw_writeq(*from, to);
break;
default:
BUILD_BUG();
}
}

void __iowrite64_copy_full(void __iomem *to, const void *from, size_t count);

static inline void __const_iowrite64_copy(void __iomem *to, const void *from,
size_t count)
{
if (count == 8 || count == 4 || count == 2 || count == 1) {
__const_memcpy_toio_aligned64(to, from, count);
dgh();
} else {
__iowrite64_copy_full(to, from, count);
}
}

#define __iowrite64_copy(to, from, count) \
(__builtin_constant_p(count) ? \
__const_iowrite64_copy(to, from, count) : \
__iowrite64_copy_full(to, from, count))

/*
* I/O memory mapping functions.
*/
Expand Down
Loading