diff options
author | Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> | 2022-11-23 23:52:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-11-25 13:44:01 +0300 |
commit | c191445874bba16a636a88fc4afc7c3ab09228fd (patch) | |
tree | 5f5cc756b7aff6261a8d2dbaf9f065c913da9ce4 /arch/sparc/Makefile | |
parent | f61e6d3ca4dac83d7093e7be7ceabce95e738e68 (diff) | |
download | linux-c191445874bba16a636a88fc4afc7c3ab09228fd.tar.xz |
cassini: Use page_address() instead of kmap_atomic()
Pages for Rx buffers are allocated in cas_page_alloc() using either
GFP_ATOMIC or GFP_KERNEL. Memory allocated with GFP_KERNEL/GFP_ATOMIC can't
come from highmem and so there's no need to kmap() them. Just use
page_address() instead. This makes the variable 'addr' unnecessary, so
remove it too.
Note that kmap_atomic() disables preemption and page-fault processing,
but page_address() doesn't. When removing uses of kmap_atomic(), one has to
check if the code being executed between the map/unmap implicitly depends
on page-faults and/or preemption being disabled. If yes, then code to
disable page-faults and/or preemption should also be added for functional
correctness. That however doesn't appear to be the case here, so just
page_address() is used.
I don't have hardware, so this change has only been compile tested.
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/Makefile')
0 files changed, 0 insertions, 0 deletions