A useful and practical guide to securing information devices when crossing borders is provided by the Canadian Bar Association here. I would not say the U.S. border is the only one of concern, others such as China might eventually become similarly aggressive (though I've seen little sign of that to date).
The guide echos many of the points made in other answers (avoid having anything sensitive on the machine at all if unnecessary (preferably keep your travel computer forensically clean), do not make it any easier than necessary for the drive to be imaged, consider encryption, back up data where you can get it so it doesn't impact your livelihood were the device to be confiscated for an unknown length of time).
One important point is that if you lose control of your device at a frontier checkpoint, you should treat it as infected with spyware from that point forward.
You should have a backup of your smartphone available (not necessarily with you). Smartphones can hold a wealth of information- it might be worth it for frequent travelers to have a separate cellphone of the same type as their main phone and transfer the SIM card between phones. By default your phone can show a nosy person all the places your phone has stopped in the last couple of weeks, on a map, and if your neighborhood cinema (say) happens to be next to something provocative, it could arouse unnecessary suspicion.
Of course this applies to ordinary folk engaged in sensitive (perhaps unpopular or commercially valuable) but legal activities. If you're actually doing genuinely bad stuff this probably won't cut it (and that's fine).
It's also important to remember that your devices can be searched upon return to your home country. The mere presence of certain technical documents on your computer under the wrong circumstances can cause you to be at risk of many millions of dollars in fines and perhaps a decade behind bars because you would be deemed to have 'exported' them. The risk level probably goes up greatly if you have clearances that allow you to have privileged access to such documents and your itinerary looks odd-- to a border guard.