From the 1971 soundtrack album, A Tribute To Jack Johnson. Hard to believe, but it seems that the recording session was almost accidental. Discogs reports:
John McLaughlin, awaiting Miles’s arrival, began improvising riffs on his guitar, and was shortly joined by Michael Henderson and Billy Cobham. Meanwhile, the producers brought in Herbie Hancock, who had been passing through the building on unrelated business, to play the Farfisa organ. Miles arrived at last and began his solo at about 2:19 on the first track.
Even though the songs are much different, as a teenager I used to play this and Jamie Brockett’s 1968 classic, “Legend of the U.S.S. Titanic” together because of the Jack Johnson link.