Patch driver builds affected by pfn_valid regression for cos-gpu-driver-builder

linux-5.10.210/ linux-5.15.149 has modified the non-ARCH-specific
pfn_valid() to use __rcu_read_lock/unlock[1][2] that is marked GPL and
cannot be used for non open source nvidia gpu driver builds.

As a workaround, reuse the old implementation for pfn_valid.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/include/linux/mmzone.h?h=v5.10.210&id=90ad17575d26874287271127d43ef3c2af876cea
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/include/linux/mmzone.h?h=v5.15.149&id=b448de2459b6d62a53892487ab18b7d823ff0529

BUG=b/326550811, b/326701851
TEST=manual
RELEASE_NOTE=Fix driver builds for drivers affected with pfn_valid build
errors.

Change-Id: I0d4f272a73cab34f027104a66830c57147fb8e22
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/67830
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
Tested-by: Arnav Kansal <rnv@google.com>
Reviewed-by: Kevin Berry <kpberry@google.com>
8 files changed
tree: bac75e22fbf0b972971c9ba54e6c20c458492752
  1. coverage/
  2. release/
  3. src/
  4. testing/
  5. .gitignore
  6. BUILD.bazel
  7. cloudbuild.yaml
  8. CONTRIBUTING.md
  9. deps.bzl
  10. go.mod
  11. go.sum
  12. LICENSE
  13. postsubmit-cloudbuild.yaml
  14. README.md
  15. run_tests.sh
  16. run_unit_tests.sh
  17. WORKSPACE
README.md

Tools for Container-Optimized OS

This is a repository of various tools developed for Container-Optimized OS. Examples include cos-gpu-installer, cos-toolbox, etc.

See CONTRIBUTING.md for how to contribute.